- Rust 46.4%
- TypeScript 23.8%
- Svelte 23.8%
- CSS 4.5%
- Shell 1.1%
- Other 0.4%
| backend | ||
| crates | ||
| docs | ||
| examples | ||
| fixtures/scenarios | ||
| frontend | ||
| infra | ||
| mk | ||
| .browserstack.yml | ||
| .dockerignore | ||
| .flake8 | ||
| .gitignore | ||
| backlog-methodology.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CONVENTIONS.md | ||
| devel.md | ||
| Dockerfile | ||
| implementation-questions.md | ||
| missing.md | ||
| README.md | ||
| rust-toolchain.toml | ||
| todo.md | ||
| tutorial.md | ||
retirement-wasm
This repository is now organized around a browser-local retirement planner:
frontend/is a SvelteKit app that owns the UI shellcrates/retirement-sim-core/is the shared Rust simulation corecrates/retirement-sim-wasm/exposes that core to the browser through WebAssemblybackend/is an Axum server that serves the static frontend and runtime config
The first implementation slice establishes the Rust workspace, WebAssembly build pipeline, worker boundary, and product shell. The real simulation model lands in the backlog notes under docs/unaddressed/notes/.
Current Architecture
frontend/scripts/build-wasm.mjsbuildscrates/retirement-sim-wasm/intofrontend/src/lib/wasm/pkg/withwasm-pack.- SvelteKit imports that generated package from a dedicated Web Worker.
- The worker initializes the Rust-generated WASM module and exposes a typed handshake.
- The Axum backend serves
/static/config.json,/healthz, and the built SPA bundle.
Requirements
- Node.js 24+
- npm 11+
- Rust 1.95.0 with edition 2024 support
- the
wasm32-unknown-unknowntarget
The repo pins the Rust toolchain in the root rust-toolchain.toml.
Local Development
Frontend:
cd frontend
npm install
npm run dev
Backend:
cargo run -p retirement-wasm-backend
The frontend dev server proxies /static and /healthz to the backend.
To start both together:
./mk/run-dev
Validation
Frontend:
cd frontend
npm install
npm run check
npm run build
npm run test -- --run
Rust workspace:
cargo test --workspace
Full wrapper:
./mk/test
Deployment Shape
The Docker image builds the frontend, compiles the Rust backend as a static binary, copies the built frontend into the runtime image, and serves everything from one process.
Backlog
Implementation routing lives in:
docs/unaddressed/notes/0000-retirement-app-routing.md
The next planned slices after the WASM pipeline are the shared domain schema, canonical assumptions, and the deterministic month-by-month household engine.