1
0

Cargo.toml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. [package]
  2. name = "codegraph-kernel"
  3. version = "0.1.0"
  4. edition = "2021"
  5. license = "MIT"
  6. publish = false
  7. description = "Native extraction kernel for CodeGraph — tree-sitter parse+extract with one JS boundary crossing per file"
  8. [lib]
  9. crate-type = ["cdylib"]
  10. [dependencies]
  11. napi = { version = "3", default-features = false, features = ["napi8"] }
  12. napi-derive = "3"
  13. tree-sitter = "0.25"
  14. sha2 = "0.10"
  15. regex = "1"
  16. # Grammars — MUST stay revision-matched with the wasm grammars the fallback
  17. # path loads (tree-sitter-wasms npm package / src/extraction/wasm/). The
  18. # kernel-grammar-parity test asserts node-kind-table equality at test time;
  19. # bump these together with the wasm side or that gate fails.
  20. tree-sitter-typescript = "0.23"
  21. tree-sitter-javascript = "0.25"
  22. tree-sitter-java = "0.23"
  23. tree-sitter-python = "0.23"
  24. tree-sitter-go = "0.23"
  25. # Pinned exact: the vendored wasm (src/extraction/wasm/) was built from these
  26. # tags' checked-in parser.c, sha-matched against these registry tarballs
  27. # (R7a prep, #1345). A patch bump here without re-vendoring breaks the match.
  28. tree-sitter-c = "=0.24.2"
  29. tree-sitter-cpp = "=0.23.4"
  30. tree-sitter-rust = "=0.24.2"
  31. # csharp: the vendored wasm (#717) predates the kernel and was verified
  32. # table-identical to this crate's tarball (ABI 15, STATE_COUNT 8053, node-kind
  33. # and field tables — csharp checklist header). Bump crate + wasm together.
  34. tree-sitter-c-sharp = "=0.23.5"
  35. # ruby: content bump, ABI stays 14 (the v0.23.1 tag predates the ABI-15
  36. # generator) — kernel-grammar-parity asserts same-revision, not same-ABI.
  37. tree-sitter-ruby = "=0.23.1"
  38. # php: the walker calls LANGUAGE_PHP (the full HTML-interleaving variant the
  39. # wasm ships) — NEVER LANGUAGE_PHP_ONLY, which errors on leading HTML.
  40. tree-sitter-php = "=0.24.2"
  41. # swift: the vendored wasm is built from THIS crate's tarball src/ (the tag's
  42. # checked-in parser.c is an older ABI-14 generation that can never sha-match;
  43. # grammar.json rules are JSON-equal — swift checklist header). parser.c is
  44. # ~20MB generated — expect slow compiles.
  45. tree-sitter-swift = "=0.7.3"
  46. # r: the vendored wasm IS r-lib v1.2.0 and this crate's tarball ships both
  47. # generated artifacts sha-identical to the tag (parser.c 6221657347…,
  48. # scanner.c 1209d11076… — r checklist §Grammar prep). ABI 14 (the tag
  49. # predates the ABI-15 generator) — parity asserts same-revision, not
  50. # same-ABI (ruby precedent). Bump crate + wasm together.
  51. tree-sitter-r = "=1.2.0"
  52. # luau: the vendored wasm IS tree-sitter-grammars v1.2.0 and this crate's
  53. # tarball ships parser.c/scanner.c sha-identical to the tag (8f25bc17… /
  54. # a157bb52… — lua-luau checklist §Grammar prep). ABI 14. Lua itself is
  55. # vendored C (build.rs) — its v0.4.1 revision is not on crates.io.
  56. tree-sitter-luau = "=1.2.0"
  57. # tree-sitter-language: the version-agnostic LanguageFn shim for the vendored
  58. # kotlin grammar C (see build.rs — no kotlin crate dep is possible).
  59. tree-sitter-language = "0.1"
  60. # Stack-bounds queries for the walker stack guard (src/stack.rs, #1581):
  61. # pthread_getattr_np / pthread_get_stackaddr_np. Already in the lock file
  62. # transitively; Windows uses a hand-declared kernel32 extern instead.
  63. [target.'cfg(unix)'.dependencies]
  64. libc = "0.2"
  65. [build-dependencies]
  66. napi-build = "2"
  67. cc = "1"
  68. [profile.release]
  69. lto = true
  70. codegen-units = 1
  71. strip = "symbols"