You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a Rust extractor against the frozen LanguageExtractor interface. The initial implementation should model common modules and type declarations while treating macro-expanded behavior conservatively.
Scope
Detect .rs files as rust.
Vendor and register a compatible Tree-sitter Rust WASM grammar.
Emit a file node and containment tree.
Extract functions, structs, enums and members, traits, implementations, methods, modules, constants, and static variables.
Capture signatures, visibility, documentation comments, return types, and generic parameters when explicit.
Emit use/module imports, calls, containment, trait implementation, type, and instantiation references where syntax is explicit.
Leave cross-file and module targets unresolved through targetName.
Required changes
Add src/graph/extraction/languages/rust.ts.
Register the extractor in src/graph/extraction/languages/index.ts.
Register .rs and the grammar filename in src/graph/extraction/grammars.ts.
Add the grammar WASM under src/graph/wasm/ and document its source, version, and license.
Add a representative Rust fixture and focused extractor tests.
Acceptance criteria
The extractor implements the frozen LanguageExtractor interface without changing it.
Extraction is pure, deterministic, and limited to one file.
Goal
Add a Rust extractor against the frozen
LanguageExtractorinterface. The initial implementation should model common modules and type declarations while treating macro-expanded behavior conservatively.Scope
.rsfiles asrust.use/module imports, calls, containment, trait implementation, type, and instantiation references where syntax is explicit.targetName.Required changes
src/graph/extraction/languages/rust.ts.src/graph/extraction/languages/index.ts..rsand the grammar filename insrc/graph/extraction/grammars.ts.src/graph/wasm/and document its source, version, and license.Acceptance criteria
LanguageExtractorinterface without changing it.implmethods, qualified names, containment, imports, calls, and explicit trait implementations.npm run typecheck,npm test, andnpm run buildpass.Out of scope
Contributor references
src/graph/extraction/languages/typescript.tssrc/graph/__tests__/extractor.test.tsContributor workflow
Open the pull request with base branch
code-graph-preview.