fix(recon-wasm): restore missing builtins.rs (E0583 build blocker)#40
Merged
Conversation
reconforth/mod.rs declared `mod builtins;` / `pub use builtins::register_builtins`, and vm.rs calls `register_builtins(&mut vm)` from `VM::new()`, but `builtins.rs` was never committed — the recon-wasm crate failed to compile (E0583), which also blocked verifying the crypto work in PR #39. Restores the core ReconForth native vocabulary the VM and its existing tests depend on: arithmetic (+ - * / mod neg), comparison (= != < > <= >=), boolean (and or not true false), stack (dup drop swap over rot nip depth), control (call if ifelse), validation reporting (error! warn! suggest!), and document-reconciliation helpers (count doc-type is-canonical). All words are total and fallible — no unwrap/panic, per estate robustness policy. cargo build clean; cargo test --lib: 32/32 pass (incl. the previously-failing tests::test_reconforth_validation). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Problem
reconforth/mod.rsdeclaredmod builtins;andpub use builtins::register_builtins, andvm.rscallsregister_builtins(&mut vm)fromVM::new(), butbuiltins.rswas never committed. Therecon-wasmcrate did not compile (E0583: file not found for modulebuiltins``). This also blocked verifying the crypto work in PR #39.Fix
Restores the core ReconForth native vocabulary the VM + existing tests rely on:
+ - * / mod neg= != < > <= >=and or not true falsedup drop swap over rot nip depthcall if ifelseerror! warn! suggest!(symmetric withVM::report_*)count doc-type is-canonicalAll words total/fallible — no
unwrap/panic!(estate robustness policy).Verification
cargo build: clean (only pre-existing unrelated warnings)cargo test --lib: 32/32 pass, including the previously-failingtests::test_reconforth_validationUnblocks build-verification of PR #39 (crypto).
🤖 Generated with Claude Code