Idea detail
native_bridge
reqlan rq/core_analysis/rust_port.rq:248
Summary
The Rust engine is the analytical core ( parse, index, search, export, typed queries, git-dates, overview coverage, barrel plan ) — not an optional addon.
`@reqlan/analytical` is a typed napi facade ( specta `generated.ts` ) plus thin Node helpers ( `createBase`, path utils, `SqliteIndexStore` wrappers over typed napi ).
It does not depend on Langium, `@reqlan/language`, or Zustand.
Webview-only helpers ( search highlight, filter labels, file-treatment, context signals / model, graph physics ) live in the extension package.
Interactive HTML JS stays in `crates/reqlan-export/assets`.
Native owns: parse-for-index, persist, query, search, export execution, IndexService / WorkspaceIndex sync,
and the index lifecycle FSM + status snapshot via `NativeWorkspaceIndex` + `NativeSqlDb`. The FSM
( `opening` / `syncing` / `ready` / `error` ), counts, in-memory sync progress / cancel, last error, file-index
issues ( cap 500 ), and the document-update / workspace-change rings ( cap 50 ) live in `WorkspaceIndexRuntime`;
TS reads them through `statusSnapshot()`. Durable diagnostics persist in `index-diagnostics.sqlite`.
Consumers: cli_package and MCP import `@reqlan/analytical/core` so they never load Langium;
the extension host uses the per-target VSIX ( vsix_export, extension_host_target ).
The host-matching `.node` is required at runtime; there is no sql. js fallback.
Navigation
Attributes
| Key | Value |
|---|---|
| status | in-progress |
| tests | load-native.test.ts, native-packaging.test.ts, native-headless-entry.test.ts, open-analysis-api.test.ts, native-export-request.test.ts, workspace-paths.test.ts, index-windows-paths.test.ts, export.rs:html_export_honours_graph_page_url_base_and_header_link |
| todo | publish first `@reqlan/analytical-<platform>-<arch>` release (Trusted Publisher on npmjs.com + analytical/v* tag) |
Ancestor context
No ancestor chain recorded.
Outbound references
Inbound references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | architecture | reqlan rq/cli/cli_package.rq | native_bridge |
| references | zustand_boundary | reqlan rq/codestyle/typescript.rq | native_bridge |
| references | analytical_package | reqlan rq/core-architecture.rq | native_bridge |
| ideaset_member | port_phases | reqlan rq/core_analysis/rust_port.rq | — |
| references | analytical_rust_port | reqlan rq/core_analysis/rust_port.rq | native_bridge |
| references | rust_crate_layout | reqlan rq/core_analysis/rust_port.rq | native_bridge |
| references | rust_binary_distribution | reqlan rq/distribution/distribution.rq | native_bridge |
| references | extension_host_target | reqlan rq/distribution/distribution.rq | native_bridge |
| references | native_host_binary_distributed | reqlan rq/distribution/native_host_binary.rq | native_bridge |
| references | state_machine_mindset | reqlan rq/extension/host/architecture.rq | native_bridge |
| references | indexer_rust | reqlan rq/indexer/indexer.rq | native_bridge |
| references | spec_html_export | reqlan rq/site/site.rq | native_bridge |
Unresolved references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| None | |||
Local graph
Initialising graph…