Skip to content

Commit 06aaa85

Browse files
authored
feat(native): port CUDA extractor to Rust (#1099)
* feat(native): port CUDA extractor to Rust Adds tree-sitter-cuda dependency and native extractor matching the WASM-side behavior for CUDA symbol, import, and call extraction. Part of #1071 * fix(native): mirror C++ extractor type-map and include name stripping in CUDA CUDA files now populate `type_map` from declarations and parameter declarations via a third walk pass, matching `cpp.rs`. Without it, receiver-typed calls like `buf.copy(...)` could not resolve to `DeviceBuffer.copy` for CUDA sources in the native layer. `#include` import names also now drop the trailing `.cuh`/`.hpp`/`.h` extension so `cInclude` resolution links CUDA headers consistently with the native C/C++ extractors. Strengthens the include test to cover the stripped names and adds two type_map tests. * chore(native): sync Cargo.lock with crate version bump from main merge
1 parent 1acf15e commit 06aaa85

10 files changed

Lines changed: 696 additions & 8 deletions

File tree

Cargo.lock

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/codegraph-core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ tree-sitter-ruby = "0.23"
2424
tree-sitter-php = "0.23"
2525
tree-sitter-c = "0.23"
2626
tree-sitter-cpp = "0.23"
27+
tree-sitter-cuda = "0.21"
2728
tree-sitter-kotlin-sg = "0.4"
2829
tree-sitter-swift = "0.6"
2930
tree-sitter-scala = "0.24"

0 commit comments

Comments
 (0)