No description
  • Rust 46.4%
  • TypeScript 23.8%
  • Svelte 23.8%
  • CSS 4.5%
  • Shell 1.1%
  • Other 0.4%
Find a file
microchipster 31dd15b4f9 fix top bar
2026-05-29 13:37:14 -07:00
backend coverage push 2026-05-17 19:26:48 -07:00
crates fix top bar 2026-05-29 13:37:14 -07:00
docs coverage push 2026-05-17 19:26:48 -07:00
examples hardening backlog 2026-05-16 23:41:04 -07:00
fixtures/scenarios checkpoint 2026-05-27 10:34:35 -07:00
frontend fix top bar 2026-05-29 13:37:14 -07:00
infra template 2026-03-28 23:43:51 -07:00
mk hardening backlog 2026-05-16 23:41:04 -07:00
.browserstack.yml do nothing template 2026-03-27 20:28:05 -07:00
.dockerignore do nothing template 2026-03-27 20:28:05 -07:00
.flake8 do nothing template 2026-03-27 20:28:05 -07:00
.gitignore coverage 2026-05-18 01:57:21 -07:00
backlog-methodology.md init 2026-04-16 13:22:32 -07:00
Cargo.lock fix top bar 2026-05-29 13:37:14 -07:00
Cargo.toml fix top bar 2026-05-29 13:37:14 -07:00
CONVENTIONS.md do nothing template 2026-03-27 20:28:05 -07:00
devel.md info 2026-05-04 17:53:41 -07:00
Dockerfile checkpoint for housing scenarios 2026-05-11 21:34:53 -07:00
implementation-questions.md implementatino questions part 2 2026-04-16 13:55:57 -07:00
missing.md init 2026-04-16 13:22:32 -07:00
README.md init 2026-04-17 11:35:18 -07:00
rust-toolchain.toml wasm template 2026-04-16 16:02:10 -07:00
todo.md fix colors 2026-04-28 23:48:42 -07:00
tutorial.md info 2026-05-04 17:53:41 -07:00

retirement-wasm

This repository is now organized around a browser-local retirement planner:

  • frontend/ is a SvelteKit app that owns the UI shell
  • crates/retirement-sim-core/ is the shared Rust simulation core
  • crates/retirement-sim-wasm/ exposes that core to the browser through WebAssembly
  • backend/ 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

  1. frontend/scripts/build-wasm.mjs builds crates/retirement-sim-wasm/ into frontend/src/lib/wasm/pkg/ with wasm-pack.
  2. SvelteKit imports that generated package from a dedicated Web Worker.
  3. The worker initializes the Rust-generated WASM module and exposes a typed handshake.
  4. 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-unknown target

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.