- One-time setup:
cargo xtask web setup - Re-run setup after
wasm-bindgendependency bumps. It force-refreshes bothwasm-server-runnerandwasm-bindgen-cli. - Live dev server:
cargo xtask web serve(useswasm-server-runner, not the standalonewasm-bindgenbinary). - Build prod bundle:
cargo xtask web build. - Serve bundle:
cargo xtask web serve-dist 8000(any HTTP server works; don’t usefile://).
Prod output: dist/ with index.html, scurve-web.js, scurve-web_bg.wasm (auto-optimized with wasm-opt if available).
- Format + clippy (with fixes):
cargo xtask tidy
- Experimental patterns (currently Hairy Onion) are hidden in the GUI by default.
- Native GUI: run
cargo run -- scurve gui --devto expose experimental curves. - Web GUI: append
?dev=1(or?experimental=1) to the served page URL to show them.
- Build with feature:
cargo build --package scurve --features screenshot - Panes:
2d,3d,about,settings,settings-3d(3D settings shows spin speed). - Capture:
cargo run --package scurve --features screenshot -- screenshot -p <pane> /tmp/out.png - Behavior: waits one extra frame so overlays (About, settings) render; single-frame capture then exit.
Handy for styling checks: run the command above and view the PNG (e.g., with the Read tool).
- Quick capture for centering/layout:
cargo run -p egui-img --example debug_viewer assets/hilbert.png --screenshot /tmp/view.png - The helper
egui_img::view_image_with_screenshotrenders one frame, saves the PNG, then closes.
cargo xtask web build- Serve
dist/via HTTP (cargo xtask web serve-dist 8000or any static server). - Files:
index.html,scurve-web.js,scurve-web_bg.wasm.
Managed with snips:
cargo install snipsThen run:
snips ./README.md