-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
87 lines (81 loc) · 3.86 KB
/
Copy pathCargo.toml
File metadata and controls
87 lines (81 loc) · 3.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
[workspace]
members = ["eval", "bindings/python", "bindings/node"]
# Single source of truth for the version shared by the crate and all bindings.
# CI stamps this from the git tag and mirrors it into pyproject.toml / package.json.
[workspace.package]
version = "0.0.0"
edition = "2024"
rust-version = "1.85"
license = "Apache-2.0"
[package]
name = "code2graph"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
description = "Purpose-neutral code-graph extraction: source files → symbols, references, and cross-file edges. Tree-sitter based, no storage opinion."
repository = "https://github.com/nodedb-lab/code2graph"
keywords = ["code-graph", "tree-sitter", "static-analysis", "symbols", "cpg"]
categories = ["development-tools", "parsing"]
[features]
default = ["rust","python","typescript","go","java","c","cpp","ruby","php","shell","swift","kotlin","solidity","sql","hcl","csharp","scala","dart","lua","luau","pascal","svelte"]
manifest = ["dep:toml", "dep:serde_json", "serde"]
serde = ["dep:serde"]
_extractors = [] # internal: enabled by every language feature; gates the shared extractor toolkit
rust = ["dep:tree-sitter-rust", "_extractors"]
python = ["dep:tree-sitter-python", "_extractors"]
typescript = ["dep:tree-sitter-typescript", "_extractors"]
go = ["dep:tree-sitter-go", "_extractors"]
java = ["dep:tree-sitter-java", "_extractors"]
c = ["dep:tree-sitter-c", "_extractors"]
cpp = ["dep:tree-sitter-cpp", "_extractors"]
ruby = ["dep:tree-sitter-ruby", "_extractors"]
php = ["dep:tree-sitter-php", "_extractors"]
shell = ["dep:tree-sitter-bash", "_extractors"]
swift = ["dep:tree-sitter-swift", "_extractors"]
kotlin = ["dep:tree-sitter-kotlin-ng", "_extractors"]
solidity = ["dep:tree-sitter-solidity", "_extractors"]
sql = ["dep:tree-sitter-sequel", "_extractors"]
hcl = ["dep:tree-sitter-hcl", "_extractors"]
csharp = ["dep:tree-sitter-c-sharp", "_extractors"]
scala = ["dep:tree-sitter-scala", "_extractors"]
dart = ["dep:tree-sitter-dart", "_extractors"]
lua = ["dep:tree-sitter-lua", "_extractors"]
luau = ["dep:tree-sitter-luau", "_extractors"]
pascal = ["dep:tree-sitter-pascal", "_extractors"]
svelte = ["dep:tree-sitter-svelte-ng", "typescript", "_extractors"]
[dependencies]
thiserror = "2"
toml = { version = "0.8", optional = true }
serde = { version = "1", optional = true, features = ["derive"] }
serde_json = { version = "1", optional = true }
tree-sitter = ">=0.24, <0.27"
# Per-language grammars — each optional, enabled via the matching feature flag.
tree-sitter-rust = { version = "0.23", optional = true }
tree-sitter-python = { version = "0.23", optional = true }
tree-sitter-typescript = { version = "0.23", optional = true }
tree-sitter-go = { version = "0.25.0", optional = true }
tree-sitter-java = { version = "0.23.5", optional = true }
tree-sitter-c = { version = "0.24.2", optional = true }
tree-sitter-ruby = { version = "0.23.1", optional = true }
tree-sitter-php = { version = "0.24.2", optional = true }
tree-sitter-bash = { version = "0.25.1", optional = true }
tree-sitter-cpp = { version = "0.23.4", optional = true }
tree-sitter-swift = { version = "0.7.3", optional = true }
tree-sitter-kotlin-ng = { version = "1.1.0", optional = true }
tree-sitter-solidity = { version = "1.2.13", optional = true }
tree-sitter-sequel = { version = "0.3", optional = true }
tree-sitter-hcl = { version = "1.1", optional = true }
tree-sitter-c-sharp = { version = "0.23.5", optional = true }
tree-sitter-scala = { version = "0.26.0", optional = true }
tree-sitter-dart = { version = "0.2.0", optional = true }
tree-sitter-lua = { version = "0.5.0", optional = true }
tree-sitter-luau = { version = "1.2.0", optional = true }
tree-sitter-pascal = { version = "0.10.2", optional = true }
tree-sitter-svelte-ng = { version = "1.0.2", optional = true }
[dev-dependencies]
serde_json = "1"
[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 1