docs(docs): Rust review rev 2 — 61 challenger findings folded (3 crates, frozen oracles, consumer-driven deletion, keyless parent, CSP/digest deploy); CLAUDE.md Rust-by-default rule; chore(memory): BDR-043, LRN-048, EVAL-016, journal, TODO Rust roadmap

This commit is contained in:
bchanot committed 2026-10-12 22:48:48 +02:00
1 parent 6a078dab74
commit 3fbf34f663
7 files changed
+661 -539

No files matched your search

+30
View File
@@ -424,6 +424,36 @@ Database (Supabase)
---
## Rust by default (rule adopted 2026-10-12, BDR-043)
Study and roadmap: `docs/development/RUST_ARCHITECTURE_REVIEW.md` (awaiting
the owner's validation before any implementation; release 0.2.0 unaffected).
- Any logic that can run in Rust with no significant loss (features, UX,
graphics, data compatibility, security, reliability, useful performance,
resources, portability, maintainability, operations) is written in Rust:
native for services, jobs and tools, WebAssembly for the browser.
Equivalence suffices; "already in TypeScript", "more work" and "no
performance gain" are never reasons to keep TypeScript.
- Kept as is: React + TypeScript for UI, DOM, routing, Zustand stores,
display formatting and vendor-SDK glue (supabase-js); UI form schemas
(Zod, i18n keys) and dictionaries; Tailwind; PostgreSQL/SQL + RLS;
Supabase Auth and Storage; Vite/ESLint tooling. A component kept in
TypeScript needs the concrete constraint recorded in the review's
exception table (Part II).
- New business logic (rules, data transformations, parsers, validators,
jobs, services, rule mirrors of SQL) is designed in `crates/` first and
reached from TypeScript through the wasm facade; Edge Functions are not
used. Boundary rules: "Rust computes, TypeScript reads" (review Part
III.3: coarse calls, JSON strings, sheet handle, closed error kinds, ids
and time injected, no call in a render path).
- Existing code migrates along the review's phases (R0–R5), each with
oracles frozen with the old code before the switch and a consumer-driven
deletion of the TypeScript it replaces; two implementations never outlive
the phase that switches the last consumer.
---
## Key dependencies
| Package | Purpose |