rustextractor

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package rustextractor provides Rust extraction with Actix/Axum/Rocket route detection.

Package rustextractor provides a tree-sitter based extractor for Rust files. It implements types.Extractor and produces declaration nodes and syntactic call/import edges without type resolution.

This extractor handles Rust-specific constructs: function items, struct/enum definitions, trait definitions (mapped to "interface" kind), impl blocks with methods, use declarations, call expressions (including scoped identifiers), macro invocations, and HTTP route detection for Actix-web, Axum, and Rocket frameworks.

All edges have provenance "ast_inferred" and confidence 0.7. The LSP enrichment pass can later upgrade confirmed edges.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RustExtractor

type RustExtractor struct {
	// contains filtered or unexported fields
}

RustExtractor implements types.Extractor for Rust files using tree-sitter AST parsing. It is AST-only with no type resolution.

func NewRustExtractor

func NewRustExtractor() *RustExtractor

NewRustExtractor creates a new RustExtractor with a tree-sitter parser configured for Rust.

func (*RustExtractor) CanHandle

func (e *RustExtractor) CanHandle(path string) bool

CanHandle returns true for .rs files that are not in the target/ directory.

func (*RustExtractor) Extract

Extract parses the Rust file with tree-sitter and produces nodes for declarations and edges for calls, imports, and routes.

func (*RustExtractor) Name

func (e *RustExtractor) Name() string

Name returns the extractor name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL