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 byKindDeclared inThrough
svelte-docinfo runtimepackage.json@fuzdev/fuz_schema
fuz_app peerpackage.json@fuzdev/fuz_schema
fuz_blog peerpackage.json@fuzdev/fuz_schema
fuz_css peerpackage.json@fuzdev/fuz_schema
fuz_repos peerpackage.json@fuzdev/fuz_schema
fuz_util peerpackage.json@fuzdev/fuz_schema
gro peerpackage.json@fuzdev/fuz_schema
zzz peerpackage.json@fuzdev/fuz_schema
blake3 devpackage.json@fuzdev/fuz_schema
corpora devpackage.json@fuzdev/fuz_schema
fuz-stack (docs.fuz.dev)devpackage.json@fuzdev/fuz_schema
fuz_code devpackage.json@fuzdev/fuz_schema
fuz_forge devpackage.json@fuzdev/fuz_schema
fuz_template devpackage.json@fuzdev/fuz_schema
fuz_ui devpackage.json@fuzdev/fuz_schema
mdz devpackage.json@fuzdev/fuz_schema
tsv devpackage.json@fuzdev/fuz_schema
tsv (tsv.fuz.dev)devpackage.json@fuzdev/fuz_schema
zap devpackage.json@fuzdev/fuz_schema

What it uses

UsesKindDeclared inThrough
blake3 devpackage.json@fuzdev/blake3-wasm
fuz_code devpackage.json@fuzdev/fuz_code
fuz_css devpackage.json@fuzdev/fuz_css
fuz_ui devpackage.json@fuzdev/fuz_ui
fuz_util devpackage.json@fuzdev/fuz_util
gro devpackage.json@fuzdev/gro
mdz devpackage.json@fuzdev/mdz
svelte-docinfo devpackage.jsonsvelte-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

  1. uses actions/checkout, pinned to a commit
  2. Use Node.js ${{ matrix.node-version }}
    uses actions/setup-node, pinned to a commit
  3. npm ci
  4. npx @fuzdev/gro check --workspace --build

rust on ubuntu-latest

  1. uses actions/checkout, pinned to a commit
  2. Install Rust
    rustup toolchain install --no-self-update
    rustup show active-toolchain
  3. cargo fmt --check
  4. cargo clippy --workspace --all-targets -- -D warnings
  5. cargo test --workspace
  6. cargo doc --workspace --no-deps --all-features --document-private-items
  7. 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

Comparisons that name it

ComparedAgainstKindRunsSource
fuz_schema, Rust sideThe TypeScript libraryTwin
Every change
fixtures
fuz_schemaZod and ValibotReference
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.

From Actions kept with a person.

Values

The order fuz_schema states its priorities in, highest first (fuz_schema's priorities):

  1. correctness
  2. speed, size
  3. memory
  4. simplicity of the internals
  5. 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.