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
Item 1 (rayon cfg-gate): re-checked call sites -- par_iter() now appears at 3 sites (analyze.rs:297, cache.rs:97, cache.rs:168), not 5. The underlying blocker (tree-sitter's C build scripts can't cross-compile to wasm32-unknown-unknown) is unchanged and still real.
Item 2 (event_rx doc comment): stale, drop this item.CodeAnalyzer no longer has an event_rx field, and LogEvent/NeverSessionManager-as-drain-source no longer exist in CodeAnalyzer at all (NeverSessionManager now only appears in main.rs as an unrelated rmcp HTTP session-manager type). Whatever this field was appears to have been refactored away since feat(http): bearer token auth middleware for HTTP MCP transport #1007. Nothing to document here.
Item 3 (wasm-check CI feature): unaffected by the above; still a real deferred item once tree-sitter WASM support exists. Note the --no-default-features flag in the proposed CI command now only disables the schemars feature (the only remaining feature flag), since the lang-* feature-gate system was removed repo-wide -- languages will still compile in regardless of that flag.
Background
During the implementation of bearer token auth for the HTTP MCP transport (#1007), three
additional changes were drafted and then removed as YAGNI:
Rayon cfg-gate in aptu-coder-core (analyze.rs, cache.rs)
event_rx doc comment in CodeAnalyzer
wasm-check CI feature and job
They are tracked here for when WASM portability becomes a concrete goal.
Items
1. Rayon wasm cfg-gate
analyze.rs and cache.rs use rayon::par_iter() at 5 call sites. Under #[cfg(target_family = "wasm")] these must fall back to sequential iter(), since rayon
requires OS threads which do not exist in any WASM target.
The implementation is straightforward:
Gate use rayon::prelude::* with #[cfg(not(target_family = "wasm"))]
At each par_iter() site, emit sequential iter() under #[cfg(target_family = "wasm")]
Blocker:tree-sitter is an unconditional direct dependency of aptu-coder-core and
includes C build scripts that cannot cross-compile to wasm32-unknown-unknown. The cfg-gate
alone does not make the crate WASM-compilable. Address alongside or after tree-sitter WASM
support.
2. event_rx doc comment
Add a doc comment to the event_rx: Arc<TokioMutex<Option<mpsc::UnboundedReceiver<LogEvent>>>>
field in CodeAnalyzer explaining the drain-once invariant under NeverSessionManager.
Small, self-contained. Can ship independently of item 1.
3. wasm-check CI feature and job
Because cargo check --target wasm32-unknown-unknown is not viable (tree-sitter C build
scripts, Rust 1.96 explicit_builtin_cfgs_in_flags blocks RUSTFLAGS='--cfg target_family="wasm"'),
a wasm-check Cargo feature was designed to activate the wasm cfg branches on a native host:
This requires updating all cfg gates to any(target_family = "wasm", feature = "wasm-check"),
adding permanent indirection at every site. Ship together with item 1.
Prerequisites
tree-sitter WASM support in the Rust ecosystem (upstream, no timeline)
Concrete WASM deployment target chosen (wasm32-wasip2 + wasmtime/Spin recommended over
wasm32-unknown-unknown + Cloudflare Workers; see prior analysis)
Status update (2026-08-28)
par_iter()now appears at 3 sites (analyze.rs:297,cache.rs:97,cache.rs:168), not 5. The underlying blocker (tree-sitter's C build scripts can't cross-compile towasm32-unknown-unknown) is unchanged and still real.event_rxdoc comment): stale, drop this item.CodeAnalyzerno longer has anevent_rxfield, andLogEvent/NeverSessionManager-as-drain-source no longer exist inCodeAnalyzerat all (NeverSessionManagernow only appears inmain.rsas an unrelated rmcp HTTP session-manager type). Whatever this field was appears to have been refactored away since feat(http): bearer token auth middleware for HTTP MCP transport #1007. Nothing to document here.wasm-checkCI feature): unaffected by the above; still a real deferred item once tree-sitter WASM support exists. Note the--no-default-featuresflag in the proposed CI command now only disables theschemarsfeature (the only remaining feature flag), since thelang-*feature-gate system was removed repo-wide -- languages will still compile in regardless of that flag.Background
During the implementation of bearer token auth for the HTTP MCP transport (#1007), three
additional changes were drafted and then removed as YAGNI:
cfg-gate inaptu-coder-core(analyze.rs,cache.rs)event_rxdoc comment inCodeAnalyzerwasm-checkCI feature and jobThey are tracked here for when WASM portability becomes a concrete goal.
Items
1. Rayon wasm cfg-gate
analyze.rsandcache.rsuserayon::par_iter()at 5 call sites. Under#[cfg(target_family = "wasm")]these must fall back to sequentialiter(), since rayonrequires OS threads which do not exist in any WASM target.
The implementation is straightforward:
use rayon::prelude::*with#[cfg(not(target_family = "wasm"))]par_iter()site, emit sequentialiter()under#[cfg(target_family = "wasm")]Blocker:
tree-sitteris an unconditional direct dependency ofaptu-coder-coreandincludes C build scripts that cannot cross-compile to
wasm32-unknown-unknown. The cfg-gatealone does not make the crate WASM-compilable. Address alongside or after tree-sitter WASM
support.
2.
event_rxdoc commentAdd a doc comment to the
event_rx: Arc<TokioMutex<Option<mpsc::UnboundedReceiver<LogEvent>>>>field in
CodeAnalyzerexplaining the drain-once invariant underNeverSessionManager.Small, self-contained. Can ship independently of item 1.
3.
wasm-checkCI feature and jobBecause
cargo check --target wasm32-unknown-unknownis not viable (tree-sitter C buildscripts, Rust 1.96
explicit_builtin_cfgs_in_flagsblocksRUSTFLAGS='--cfg target_family="wasm"'),a
wasm-checkCargo feature was designed to activate the wasm cfg branches on a native host:This requires updating all cfg gates to
any(target_family = "wasm", feature = "wasm-check"),adding permanent indirection at every site. Ship together with item 1.
Prerequisites
wasm32-unknown-unknown + Cloudflare Workers; see prior analysis)