fuz_schema
utilities · ready · TypeScript, Rust · schema.fuz.dev
fuz_schema as this site sees it: what its repo's own files declare, and every record on the coherence and values pages that names it or links it. This page is computed and adds nothing of its own. For what the project is, see the Fuz stack page.
What uses it
The stack repos that declare a dependency on it. A breaking change has to be carried through each of them, and through any consumer that no manifest declares. Only the stack's own projects are listed, so a consumer outside the stack is not here.
| Used by | Kind | Declared in | Through |
|---|---|---|---|
| svelte-docinfo | runtime | package.json | @fuzdev/fuz_schema |
| fuz_app | peer | package.json | @fuzdev/fuz_schema |
| fuz_blog | peer | package.json | @fuzdev/fuz_schema |
| fuz_css | peer | package.json | @fuzdev/fuz_schema |
| fuz_repos | peer | package.json | @fuzdev/fuz_schema |
| fuz_util | peer | package.json | @fuzdev/fuz_schema |
| gro | peer | package.json | @fuzdev/fuz_schema |
| zzz | peer | package.json | @fuzdev/fuz_schema |
| blake3 | dev | package.json | @fuzdev/fuz_schema |
| corpora | dev | package.json | @fuzdev/fuz_schema |
| fuz-stack (docs.fuz.dev) | dev | package.json | @fuzdev/fuz_schema |
| fuz_code | dev | package.json | @fuzdev/fuz_schema |
| fuz_forge | dev | package.json | @fuzdev/fuz_schema |
| fuz_template | dev | package.json | @fuzdev/fuz_schema |
| fuz_ui | dev | package.json | @fuzdev/fuz_schema |
| mdz | dev | package.json | @fuzdev/fuz_schema |
| tsv | dev | package.json | @fuzdev/fuz_schema |
| tsv (tsv.fuz.dev) | dev | package.json | @fuzdev/fuz_schema |
| zap | dev | package.json | @fuzdev/fuz_schema |
What it uses
| Uses | Kind | Declared in | Through |
|---|---|---|---|
| blake3 | dev | package.json | @fuzdev/blake3-wasm |
| fuz_code | dev | package.json | @fuzdev/fuz_code |
| fuz_css | dev | package.json | @fuzdev/fuz_css |
| fuz_ui | dev | package.json | @fuzdev/fuz_ui |
| fuz_util | dev | package.json | @fuzdev/fuz_util |
| gro | dev | package.json | @fuzdev/gro |
| mdz | dev | package.json | @fuzdev/mdz |
| svelte-docinfo | dev | package.json | svelte-docinfo |
Read from the repos' manifests on . Only each repo's root manifests are read. A manifest shows what a repo declares, which is not always what its code imports, and a dependency that no manifest states, such as a sibling checkout a test reads, is not here. The kind is the manifest table a dependency is declared in, not how much it matters: an app that bundles what it builds declares everything as dev. See every dependency in the stack.
What it declares from outside the stack
- runtime
- Cargo.toml: serde, serde_json, wasm-bindgen
Read from the repo on . What a repo's manifests declare from outside the stack, by name and without versions. The dev tables are left out, so what an app bundles from its dev table is not here. For a Cargo workspace the list is every crate's together, and it is what is declared, not what a release build links. A crate is left out as tooling only when it is named xtask or testing_*, or the release audit marks it dev-only, so what a bench, debug or test-support crate under another name uses is listed with the rest. See everything the stack declares.
Its check script and CI
The check script of its package.json:
gro check
How its CLAUDE.md comments its check command:
gro check # typecheck, test, lint, format check (run before committing)
line 19, marked as the command to run before committing
It is among the repos whose check script runs gro check; with a CI step, on a push or a pull request, that runs gro check with --workspace; with an exports map in package.json, and a CI step, on a push or a pull request, that runs gro check with --workspace; with a CI step, on a push or a pull request, that runs gro check with --build; with a Cargo workspace at the root.
.github/workflows/check.yml runs on push (branches main), pull_request (branches **), workflow_dispatch
build on ubuntu-latest
- uses
actions/checkout, pinned to a commit - Use Node.js ${{ matrix.node-version }} uses
actions/setup-node, pinned to a commit -
npm ci
-
npx @fuzdev/gro check --workspace --build
rust on ubuntu-latest
- uses
actions/checkout, pinned to a commit - Install Rust
rustup toolchain install --no-self-update rustup show active-toolchain
-
cargo fmt --check
-
cargo clippy --workspace --all-targets -- -D warnings
-
cargo test --workspace
-
cargo doc --workspace --no-deps --all-features --document-private-items
- Build the wasm and check its size
cargo build -p fuz_schema_wasm --target wasm32-unknown-unknown --release wasm="${CARGO_TARGET_DIR:-target}/wasm32-unknown-unknown/release/fuz_schema_wasm.wasm" ceiling_file=crates/fuz_schema_wasm/wasm_size_ceiling.txt size=$(wc -c < "$wasm") # the one line that is not a comment, which may be indented, or blank; # a second keeps its newline, which the number check refuses ceiling=$(grep -vE '^[[:space:]]*(#|$)' "$ceiling_file" | tr -d ' \t\r' || true) case $ceiling in '' | *[!0-9]*) echo "::error file=$ceiling_file::no ceiling read from $ceiling_file: it holds one number of bytes, and # comments" exit 1 ;; esac echo "fuz_schema_wasm.wasm: $size bytes, ceiling $ceiling" if [ "$size" -gt "$ceiling" ]; then echo "::error file=$ceiling_file::fuz_schema_wasm.wasm is $size bytes, over the ceiling of $ceiling. The build reaches code it didn't: diff an unstripped build (CARGO_PROFILE_RELEASE_STRIP=false) against one under the ceiling with twiggy diff, and keep what the wasm reaches from reaching the issues. Raise the ceiling in $ceiling_file only for growth that is meant." exit 1 fi
Read from the repo on . A workflow's jobs and steps are as the file writes them: a step's command, or the action it uses without its version. An action's inputs, a matrix's values, permissions, environment and working directories are left out, and nothing here says which command is the gate. A line is quoted when it sits in a code block of the repo's CLAUDE.md, has a # comment after the command, and either is the command gro check or npm run check, or has a comment that says to run it before committing. A repo that describes its check command in a sentence or a list, or in another file, has no line here. Every file is read at the repo's main branch as the checkout last fetched it, so nothing uncommitted or unpushed is here. See every repo's checks.
Holds that name it
- In places: Tool: Drift checks and twin suites — Two copies drift apart
- In places: Shape: One schema, one library — Two copies drift apart
- In places: Tool: Oracles, mutants and control cases — Green but wrong
- In places: Tool: Figures computed from reports — A wrong claim gets acted on
- In places: Session: Race the candidates — A predicted speedup that is not one
- Throughout: Written: Measure before claiming — A predicted speedup that is not one
- In places: Tool: Committed size limits — A predicted speedup that is not one
- In places: Tool: Deny rules and dry runs — An unattended session does something irreversible
Comparisons that name it
| Compared | Against | Kind | Runs | Source |
|---|---|---|---|---|
| fuz_schema, Rust side | The TypeScript library | Twin | Every change | fixtures |
| fuz_schema | Zod and Valibot | Reference | Every change | differential |
From Oracles in use.
Gates
- Types, tests, lints and format (every change): Type errors, regressions, lint errors and style drift. fuz_schema is among the repos whose check script runs gro check.
- Drift in generated files (every change): A generated file that no longer matches its source. fuz_schema is among the repos whose check script runs gro check.
- Drift in the package exports map (ci): An exports map that no longer matches the source, which the local gate rewrites instead of failing on. fuz_schema is among the repos with an exports map in package.json, and a CI step, on a push or a pull request, that runs gro check with --workspace.
- Build (ci): A broken build. fuz_schema is among the repos with a CI step, on a push or a pull request, that runs gro check with --build.
- A clean tree after the run, and no TODO docs at the root (ci): Uncommitted output and a TODO Markdown file at the repo root. fuz_schema is among the repos with a CI step, on a push or a pull request, that runs gro check with --workspace.
- Size limits in CI (ci): A WebAssembly build or a native addon that has grown. Where: tsv and fuz_schema.
- Mutation run (on demand): A test that passes whether or not the code is right. Where: fuz_schema.
From Gates. A gate is listed here when its row names the project or links its repo, or speaks of a class of repos that the snapshot puts this one in.
Actions kept with a person
- Add or upgrade a dependency (written rule): Only a written rule, with an allowlist to choose from. fuz_schema alone has a test that fails on a runtime dependency.
Values
The order fuz_schema states its priorities in, highest first (fuz_schema's priorities):
- correctness
- speed, size
- memory
- simplicity of the internals
- flexibility
- A decision: correctness over speed. Checking every key of a strict object, where counting the keys was faster. Cost: A share of the time of every strict parse. declined
- A decision: worst case over size. An issue path that stays linear on deep input. Cost: The bytes a smaller path-copying form would have saved. declined
- A decision: speed over memory. A lowercase conversion that always copies, where skipping the copy allocated less. Cost: An allocation per parse, since allocation only breaks ties. declined
- A decision: memory over speed. No lookup table held by each object schema, where one made some checks faster. Cost: The faster lookup on input out of the schema order. declined
- Passes the question of correctness: fuz_schema's priorities, where a fix of over-acceptance goes ahead of speed and size
- Where the stack falls short of performance: Energy and browser performance are never measured, and memory is gated in one place, the heap fuz_schema's schemas retain.
- A context: A library shipped to a browser. Bytes cross a network, so they rank with speed, and a written rule sets what speedup a byte must buy. fuz_schema's grading rules
- A context: Input a remote party wrote. The time or memory an input can force is ranked with correctness, ahead of speed and size. fuz_schema's priorities
- Cited for how claims are made: The fuz_schema README, which says where it is not the fastest
- Cited for how claims are made: fuz_schema's record of trades that were built, measured and declined
- Cited for how claims are made: fuz_schema's priorities, where a feature not everyone needs is a separate export that bundles to nothing unused
From the values page.