A web navigator for distributions over integer sequences, built as the visual client for natwalk. A tree's children partition their parent's interval. Each child has a weight under each measure, and what its branch means (a token, a note) comes separately.
A language model's tree of texts. A box's height follows its probability and its width follows its surprisal. The child boxes cover their parent's probability mass times its conditional entropy when one measure sets both dimensions.
Install Bun, Rust, wasm-pack, and uv.
bun install
bun run dev # builds the Rust core and serves http://localhost:5173Open http://localhost:5173. Drop a snapshot onto the page, or generate the
Zen of Python character n-gram dataset with bun run data from the repository
root. The generator needs a natwalk checkout beside this one.
For live inference, start bun run live for language models or
bun run scribe for music transcription in a second terminal.
| Guide | Covers |
|---|---|
| Browser | Reading the picture, comparing measures, controls, and saved views |
| Rust core | Trees, exact positions, layout, picking, and demand sessions |
| Protocol | WebSocket messages, search, and snapshot format |
| Servers and exports | Live language models, model scheduling, and snapshot generation and migration |
| Music transcription | MuScriptor, audio recordings, and the piano roll |
Build scripts are run from the repository root. The Rust core builds to WebAssembly for the browser and to a native Python module through PyO3 and maturin. The Python scripts declare the local core dependency, so uv builds it automatically. Generated WebAssembly files and Python wheels are build outputs.
bun run test # TypeScript, native Rust, and Python tests
bun run typecheck
bun run build # static site in dist/, including WebAssembly and datasets
bun run bench # browser frame timings and canvas/inspector snapshots
bun run proto # regenerate TypeScript and Python bindings; needs protocFor targeted checks after building the core:
bun test
cargo test --manifest-path core/Cargo.toml
uv run tests/server_test.py
uv run tests/scribe_test.pyThe server tests use deterministic distributions.
To try the same fixture in the browser, run
PORT=8427 uv run tests/server_test.py --serve and open
http://localhost:5173/?server=http://127.0.0.1:8427/.
