Printable idea sheet
indexer_rust
reqlan rq/indexer/indexer.rq:332
Katz 0.172
The index engine ( parse-for-index → extract → SQLite persist → incremental sync ) should be written in Rust.
Crate: `reqlan-index` over `reqlan-parse` per rust_crate_layout.
Extractor ports extract.rs including wildcard_reference_edges.
Store ports schema v4 ( schema.ts ) via rusqlite; diagnostics live in `index-diagnostics.sqlite` on the same engine.
Sync keeps nonblocking_index: per-file upsert, mtime skip, hard rebuild, cancellable progress.
Not the Langium LSP. Comment-file indexing: index_code_files.
- plan
- goal
Native WorkspaceIndex: same rows and incremental behaviour, no Langium on the index path.
constraints
- Schema v4 rusqlite only (no sql.js fallback) after cutover.
- nonblocking_index and index_diagnostics_timing still apply.
- Wildcard fan-out stays wildcard_reference_edges.
- Extension requires the host-matching core engine `.node` from the per-target VSIX.
steps
1. Rust AST → IdeaRecord / EdgeRecord parity tests against the current extractor.
2. rusqlite store + migrations matching SCHEMA_VERSION 4.
3. Soft/hard sync, mtime skip, cancel, diagnostics.
4. Wire through native_bridge once parse+extract golden tests pass.
open
- Richer per-file timing rows from Rust sync into the diagnostics store. - status
- in-progress
- tests
- extract_parity.rs:indexes_scalar_list_block_and_flag_attribute_values, extract_parity.rs:qualified_ideaset_member_reference_targets_leaf_idea_not_ideaset, golden_corpus.rs:corpus_idea_names_match_langium_extract, schema.rs:opens_at_schema_version_4, sync.rs:soft_sync_skips_unchanged_mtime, wildcard_reference_edges.rs:expands_wildcard_refs_to_one_edge_per_matching_idea, wildcard_reference_edges.rs:sync_persists_wildcard_reference_edges
- todo
- surface per-file timing diagnostics from Rust sync into IndexDiagnosticsStore
Interactive page: indexer_rust