Development Workflow
Workspace structure
Build commands
Check (fast feedback)
Build native (for tests)
Unit tests
Format
Lint
WASM build (Leptos example)
Dev server
Code conventions
- Edition: Rust 2021
- Max line width: 80 characters (
rustfmt.toml) - Imports: grouped by
StdExternalCrate, granularityCrate - Comments: wrapped at 80 chars
- No
unwrap()in production code — useexpect("reason")or error propagation
Key invariants
rs-grid-corehas zero WASM dependencies — must remain testable withcargo test- Row indices are
u64(notusize) for WASM32 compatibility - All mutations go through
GridState::apply(GridCommand) - Hit-testing must stay O(log n) — column offsets are precomputed
- Dependency flow is one-directional:
leptos → web → render-canvas → scene → core