# Bel in WebAssembly An experimental Rust-hosted Bel bootstrap and a compiler written in Bel that emits WebAssembly. This is a standalone source distribution from randallb.com. ## Run the interpreter Tested with Rust 1.95.0. ```sh cargo build --locked -p bel-rust-repl --bins cargo run --locked -p bel-rust-repl ``` At the prompt, enter `:bootstrap`, then `(map atom '(a b (c)))`. ## Compile and verify Wasm Requires Python 3 and Node/npm as well as Rust. Run from this archive's root: ```sh npm install --prefix target/bel-wasm-tools --no-save --ignore-scripts wabt@1.0.39 python3 experiments/bel-rust-repl/wasm/verify.py python3 experiments/bel-rust-repl/wasm/verify-lists.py python3 experiments/bel-rust-repl/wasm/verify-emitter.py ``` The compiler supports documented subsets, not every Bel program. See `experiments/bel-rust-repl/wasm/README.md`, `LISTS.md`, and `EMITTER.md` for language coverage, bootstrap boundaries, and limitations. ## Tests ```sh cargo test --locked -p bel-rust-repl cargo clippy --locked -p bel-rust-repl --all-targets -- -D warnings ``` ## Source and attribution `ORIGIN.json` identifies the upstream revision. Original source and documentation remain unchanged under `experiments/bel-rust-repl`. This package adds a minimal Cargo workspace, its lockfile, this README, and attribution files. Commands in upstream documentation that start with `direnv exec .` can be run without that prefix when the tools are installed. The original project explores [Paul Graham's Bel](https://paulgraham.com/bel.html), including its published source as bootstrap fixtures. The host does not implement every Bel feature. See the original README for detailed limits and source references.