Idea detail
analytical_rust_port
reqlan rq/core_analysis/rust_port.rq:15
block
in-progress
Summary
Port analytical_package to Rust: lexer, parser ( index path ), extractor, SQLite index, search, and export.
`@reqlan/analytical` remains the published JS facade ( `createAnalysisRuntime` / `AnalysisApi` / Zustand host state ).
Native work lives in a `crates/` Cargo workspace and ships as per-architecture binaries per rust_binary_distribution.
The editor language server is language_server_rust. This analytical port does not replace that process.
Component plans: rust_crate_layout, lexer_rust, parser_rust, parser_align, indexer_rust, search_rust, export_rust, native_bridge, cutover.
Navigation
Attributes
| Key | Value |
|---|---|
| plan | goal Same AnalysisApi behaviour, faster and native, distributed as per-arch npm packages and per-target VSIXes without breaking the shared `<base>/.reqlan` index. The editor LSP is Rust (language_server_rust). constraints - Ship per rust_binary_distribution and vsix_export: npm platform packages + host-targeted VSIX; website listing and GitHub-release postinstall out of scope. - On-disk ideas index schema stays compatible (index) so TS and Rust share application memory during cutover. - Syntax requirements stay in syntax.rq. The language server parses with `reqlan-parse` (analytical_rust_port). Do not switch the language to tree-sitter (grammar_and_parser). - Port the context-sensitive lexer, not a naive parser-generator (lexer_bridge_to_syntax, nested_curly_braces, context_sensitive_lexer_scaling). - Honour nonblocking_index, parse_budget_timeout, rust_mindset, supply_chain. - Extension host loads the host-matching napi `.node` from the per-target VSIX (extension_host_target); missing core engine is a hard error (no sql.js fallback). - Interactive HTML graph/search JS and graph physics stay JS assets (html_export_graph_layout). - Comment-file indexing is index_code_files (native sync, not a Langium comment-grammar pass). steps 1. Scaffold crates + CI + golden harness (rust_crate_layout). 2. Lexer then parser with recovery and budget (lexer_rust, parser_rust). 3. Extractor + rusqlite index + incremental sync (indexer_rust). 4. Search and analysers (search_rust). 5. Export snapshot and writers (export_rust). 6. napi-rs loader in `@reqlan/analytical`; CLI/MCP first (native_bridge, cutover). 7. Publish platform packages on `analytical/v*` and ship per-target VSIXes (analytical_rust_port, vsix_export). open - Language-server process: language_server_rust. CLI `parse` uses the core Rust engine. |
| status | in-progress |
| tests | lexer.rs:prose_braces_stay_other, parser.rs:keeps_inline_prose_braces, extract_parity.rs:indexes_scalar_list_block_and_flag_attribute_values, golden_corpus.rs:corpus_idea_names_match_langium_extract, langium-corpus-golden.test.ts:committed dump matches live Langium extract, fuzzy.rs:ranks_exact_and_prefix_matches_ahead_of_subsequence_fuzzy_hits |
| todo | first `@reqlan/analytical-<platform>-<arch>` publish (Trusted Publisher on npmjs.com + analytical/v* tag) |
Ancestor context
No ancestor chain recorded.
Outbound references
Inbound references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | click | reqlan rq/cli/click.rq | analytical_rust_port |
| references | analytical_package | reqlan rq/core-architecture.rq | analytical_rust_port |
| references | ideas_index | reqlan rq/core-architecture.rq | analytical_rust_port |
| references | analysis_scope | reqlan rq/core_analysis/core.rq | analytical_rust_port |
| references | rust_binary_distribution | reqlan rq/distribution/distribution.rq | analytical_rust_port |
| references | language_server_rust | reqlan rq/extension/language/support/language-server-rust.rq | analytical_rust_port |
Unresolved references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| None | |||
Local graph
Initialising graph…