Repository navigation
Conversation
- Entrances: each pub method and constructor of a #[wasm_bindgen] impl, #[wasm_bindgen(start)], #[uniffi::export] fns and an exported impl's methods (a trait impl's all) are foreign exports, named Type::method; an extern block's imports, private, pub(crate), skipped and plain impls' methods are not. An example's main at Cargo's default paths is a new example rule. - Lists: rustListOf fills the lists slot (a top-level const or static array: strings, tuples by their first, paths by their last segment), and mirrors.ts now reads a list through its language's lists slot, which no core module read before. - Manifest: testFiles ^tests\.rs$; pkg beside Cargo.toml is wasm-pack output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CodeQL's js/unvalidated-dynamic-method-call: the reader comes from a plugin's syntax slot, chosen by the list file's language. A slot that is not a function now falls back to the TypeScript reader instead of throwing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#147 filled the Rust plugin's text slots, but it still missed most of what a wasm crate exports, and it left the
listsslot empty. This change ports what Holofield's ejected Rust plugin read, written to fit #147's structure.#[wasm_bindgen] implis now detected, and namedType::method. So are#[wasm_bindgen(start)]functions,#[uniffi::export]functions, and the pub methods of an exported impl (every method, for a trait impl). These are not detected: imports in anexternblock, private,pub(crate)and#[wasm_bindgen(skip)]methods, methods of a plain impl, a trait impl under#[wasm_bindgen], and anything in#[cfg(test)]. Before, a constructor was detected as a barenew, and an extern block's#[wasm_bindgen(js_namespace = …)] fnwas detected as an export. These all stay under the existingforeign exportrule, so no existing rule is renamed (d-bd0638ec).examplerule detectsfn maininexamples/x.rsandexamples/x/main.rs, namedexample x. A helper file beside it and anexamples/folder undersrc/are not detected.rustListOffills thelistsslot. It reads a top-levelconstorstaticarray (behind&or invec![…]): string literals (raw strings by their contents), tuples by their first element, and paths by their last segment. Anything else is reported as unread, and comments are skipped.listsslot.mirrors.tsalways used the TypeScript reader, so a Rust list named under## mirrorswas reported as gone.readLiteralnow asks the language of the list's file for itslistsreader, and falls back to the TypeScript reader.Literalis now exported from the plugin API.testFilesgets^tests\.rs$.markedFoldersgetspkgbesideCargo.toml(wasm-pack output).notDetectednow also lists macro-generated exports, UniFFI.udlfunctions, wasm-bindgen's generated field accessors, and examples away from the default paths.entrance-candidates.test.tscovers wasm, UniFFI and examples, with the negatives.rust-source.test.tscovers the lists reader.mirrors.test.tshas a Rust list mirrored by a TypeScript literal, broken by an edit.walks.test.tshaspkgbeside a Cargo.toml.Checked by hand on Holofield (11 Rust crates, wasm-bindgen viewer and session crates). Entrance detection found 34 entrances on main and 153 on this branch. Foreign exports went from 32 to 135: the
Viewer,SimulationandMeshWorkerimpl methods, and main's two barenews are nowViewer::newandSimulation::new. Examples went from 0 to 16. That is the same set of (file, symbol) pairs as the ejected plugin. The lists reader reads Holofield's chart tables (KINDS,FUNCTIONS,SEQUENTIAL,ALIASES,TOP) with nothing unread.Tests: 750 run, 737 pass, 2 skipped. 11 fail, the same 11 as on main in this environment: no pytest or tach venv, no gopls, a temp-folder cleanup in dead-triggers, and the reporter-dependent run tests, because Node 25 prints its spec reporter where
testMatchexpects TAP. With a node shim that adds--test-reporter=tap, 9 fail, also all present on main. The lexicon check and spec check are clean (533 bullets, 0 problems).Spec: the entrance detection bullet now covers examples and the impl exports. A new Lifecycle bullet, "a mirror's list is read in its own language", covers the core change. Each was refuted with
refuteand witnessed batched and alone withrun --each.🤖 Generated with Claude Code