tsv
tooling · ready · Rust · tsv.fuz.dev
tsv 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 |
|---|---|---|---|
| gro | runtime | Cargo.toml(registry) | tsv_ts |
| gro | runtime | package.json | @fuzdev/tsv |
| tsv-format (vscode-extension-tsv-format) | runtime | package.json | @fuzdev/tsv-format-wasm |
| blake3 | dev | package.json | @fuzdev/tsv |
What it uses
| Uses | Kind | Declared in | Through |
|---|---|---|---|
| blake3 | dev | package.json | @fuzdev/blake3-wasm |
| blake3 (declared by tsv.fuz.dev) | dev | package.json | @fuzdev/blake3-wasm |
| fuz_code (declared by tsv.fuz.dev) | dev | package.json | @fuzdev/fuz_code |
| fuz_css (declared by tsv.fuz.dev) | dev | package.json | @fuzdev/fuz_css |
| fuz_schema | dev | package.json | @fuzdev/fuz_schema |
| fuz_schema (declared by tsv.fuz.dev) | dev | package.json | @fuzdev/fuz_schema |
| fuz_ui (declared by tsv.fuz.dev) | dev | package.json | @fuzdev/fuz_ui |
| fuz_util | dev | package.json | @fuzdev/fuz_util |
| fuz_util (declared by tsv.fuz.dev) | dev | package.json | @fuzdev/fuz_util |
| gro | dev | package.json | @fuzdev/gro |
| gro (declared by tsv.fuz.dev) | dev | package.json | @fuzdev/gro |
| mdz (declared by tsv.fuz.dev) | dev | package.json | @fuzdev/mdz |
| svelte-docinfo (declared by tsv.fuz.dev) | 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
tsv
- runtime
- Cargo.toml: argh, bumpalo, futures-util, js-sys, napi, napi-derive, serde, serde_json, similar, smallvec, talc, thiserror, tokio, unicode-ident, unicode-segmentation, unicode-width, wasm-bindgen, zmij
- build
- Cargo.toml: napi-build
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
tsv
The check script of its package.json:
cargo fmt --check && npm run format:audit && npm run pins:audit && npm run docs:audit && npm run docs:audit:docsrs && npm run deps:audit && npm run package:audit && npm run typecheck && npm run typecheck:features && npm run typecheck:wasm32 && npm run typecheck:scripts && npm run typecheck:bench-core && npm run conformance:audit && npm run variants:audit && npm run scan:audit && npm run fanout:audit && npm run roundtrip:audit && npm run roundtrip:audit:prettier && npm run discovery:audit && npm run binding:audit && npm run authoring:audit && npm run paren:audit && npm run razor:audit && npm run fuzz:audit && npm run fuzz:audit:debug && npm run test:node && npm run test && npm run test:depth && npm run test:audits && npm run swallow:audit && npm run comments:audit && npm run gaps:audit && npm run blanks:audit && npm run fabrication:audit && npm run census:audit && npm run width:audit && npm run ignore:audit && npm run check:ast-types && npm run check:loc && npm run lint
How its CLAUDE.md comments its check command:
npm run check # full committed-tree gate: fmt, audits, typecheck, tests, clippy; runs no Deno task
line 108
It is among the repos with a Cargo workspace at the root.
.github/workflows/check.yml runs on push (branches main), pull_request (branches **), workflow_dispatch
check on ubuntu-latest
- uses
actions/checkout, pinned to a commit - Install Rust
rustup toolchain install --no-self-update rustup show active-toolchain cargo --version
- uses
Swatinem/rust-cache, pinned to a commit - Verify Cargo.lock is current
cargo metadata --locked --format-version 1 > /dev/null
- Install Node uses
actions/setup-node, pinned to a commit - Install npm dependencies
npm ci
- Install the sidecar's npm dependencies
npm ci --prefix crates/tsv_debug/sidecar
- Check
npm run check
artifacts on ubuntu-latest
- uses
actions/checkout, pinned to a commit - Install Rust
rustup toolchain install --no-self-update rustup show active-toolchain
- uses
Swatinem/rust-cache, pinned to a commit - Install wasm-pack uses
taiki-e/install-action, pinned to a commit - Install Node uses
actions/setup-node, pinned to a commit - Install npm dependencies
npm ci
- Build packages
npm run build:packages
- Validate artifact sizes
npm run validate:artifacts
- Node package tests
npm run test:npm:run npm run test:npm:parse:run npm run test:npm:all:run
- N-API npm package test (linux)
npm run test:napi:npm
- Validate N-API artifact sizes (linux)
npm run validate:napi
- Depth contract, napi profile
npm run test:depth:napi
- Engine parity (wasm vs native)
npm run engines:audit
- Depth contract, WASM engine
npm run test:depth:wasm
- Crates packaging (publish dry run)
npm run publish:crates:package
platforms on ${{ matrix.os }}
- uses
actions/checkout, pinned to a commit - Install Rust
rustup toolchain install --no-self-update rustup show active-toolchain
- uses
Swatinem/rust-cache, pinned to a commit - Install Node uses
actions/setup-node, pinned to a commit - Install the sidecar's npm dependencies
npm ci --prefix crates/tsv_debug/sidecar
- Test
cargo test --locked --workspace --no-fail-fast
- N-API boundary test if
${{ !cancelled() }}npm run test:napi
- N-API npm package test if
${{ !cancelled() }}npm run test:napi:npm
.github/workflows/release.yml runs on push (tags v*), workflow_dispatch, schedule (at 17 6 * * 1)
build on ${{ matrix.runner }}
- Refuse a real publish that is not on a tag if
github.event_name == 'workflow_dispatch' && !inputs.dry_run && github.ref_type != 'tag'echo "::error::a real publish (dry_run=false) must be dispatched on the release tag, not on '$GITHUB_REF_NAME' — dispatch it on the tag, or leave dry_run=true to rehearse" exit 1
- uses
actions/checkout, pinned to a commit - Install Rust
if ! command -v rustup >/dev/null; then curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain none echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" export PATH="$HOME/.cargo/bin:$PATH" fi rustup toolchain install --no-self-update rustup component add llvm-tools-preview rustup show active-toolchain
- if
matrix.build == 'native'usesSwatinem/rust-cache, pinned to a commit - if
matrix.build != 'native'usesactions/cache, pinned to a commit - Install Node uses
actions/setup-node, pinned to a commit - Fetch the training corpus
mkdir -p .pgo node scripts/pgo/pgo.ts corpora --fetch
- Build plain + instrumented (native) if
matrix.build == 'native'cargo build --locked -p tsv_cli --release sh scripts/pgo/build.sh instrument .pgo
- Build plain + instrumented (almalinux:8 — glibc 2.28 floor) if
matrix.build == 'gnu-container'docker run --rm -v "$PWD:/work" -w /work \ -e CARGO_HOME=/work/.container-cargo \ -e RUSTUP_HOME=/work/.container-rustup \ almalinux:8 bash -ec ' dnf install -y -q gcc curl curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain none export PATH="/work/.container-cargo/bin:$PATH" rustup toolchain install --no-self-update cargo build --locked -p tsv_cli --release sh scripts/pgo/build.sh instrument .pgo' - Build plain + instrumented (rust:alpine — musl) if
matrix.build == 'musl-container'channel=$(sed -n 's/^channel = "\(.*\)"$/\1/p' rust-toolchain.toml) docker run --rm -v "$PWD:/work" -w /work \ -e CARGO_HOME=/work/.container-cargo \ -e RUSTFLAGS='-C target-feature=-crt-static' \ "rust:${channel:?no channel in rust-toolchain.toml}-alpine" sh -ec ' apk add --no-cache musl-dev rustup toolchain install --no-self-update cargo build --locked -p tsv_cli --release sh scripts/pgo/build.sh instrument .pgo' - Stage the instrumented pair
node scripts/pgo/pgo.ts stage --phase instrument --triple ${{ matrix.triple }} - Train if
matrix.build != 'musl-container'node scripts/pgo/pgo.ts train --triple ${{ matrix.triple }} - Train (node:alpine) if
matrix.build == 'musl-container'docker run --rm -v "$PWD:/work" -v "$PWD/../corpora:/corpora:ro" -w /work \ node:24.14.1-alpine \ node scripts/pgo/pgo.ts train --triple ${{ matrix.triple }} --corpora /corpora - Merge the profiles
node scripts/pgo/pgo.ts merge --triple ${{ matrix.triple }} - Build profile-use (native) if
matrix.build == 'native'sh scripts/pgo/build.sh use .pgo
- Build profile-use (almalinux:8 — glibc 2.28 floor) if
matrix.build == 'gnu-container'docker run --rm -v "$PWD:/work" -w /work \ -e CARGO_HOME=/work/.container-cargo \ -e RUSTUP_HOME=/work/.container-rustup \ almalinux:8 bash -ec ' dnf install -y -q gcc export PATH="/work/.container-cargo/bin:$PATH" sh scripts/pgo/build.sh use .pgo' - Build profile-use (rust:alpine — musl) if
matrix.build == 'musl-container'channel=$(sed -n 's/^channel = "\(.*\)"$/\1/p' rust-toolchain.toml) docker run --rm -v "$PWD:/work" -w /work \ -e CARGO_HOME=/work/.container-cargo \ -e RUSTFLAGS='-C target-feature=-crt-static' \ "rust:${channel:?no channel in rust-toolchain.toml}-alpine" sh -ec ' apk add --no-cache musl-dev rustup toolchain install --no-self-update sh scripts/pgo/build.sh use .pgo' - Profile-applied and no-instrumentation gates
node scripts/pgo/pgo.ts gate-builds --triple ${{ matrix.triple }} node scripts/pgo/pgo.ts gate-sections --triple ${{ matrix.triple }} - Stage platform package
node scripts/pgo/pgo.ts stage --phase use --triple ${{ matrix.triple }} - glibc floor gate (gnu, <= 2.28) if
matrix.build == 'gnu-container'for artifact in crates/tsv_napi/pkg/${{ matrix.triple }}/tsv_napi.node crates/tsv_napi/pkg/${{ matrix.triple }}/tsv; do # objdump runs alone (not in the substitution pipeline) so an unreadable # artifact fails the step loudly instead of vanishing under pipefail; the # grep pipeline takes `|| true` so a no-match yields the visible "none" # rather than killing the step inside the assignment. objdump -T "$artifact" > /tmp/syms.txt max=$(grep -oE 'GLIBC_[0-9]+\.[0-9]+' /tmp/syms.txt | sort -uV | tail -1 || true) echo "$artifact max versioned glibc symbol: ${max:-none}" if [ -n "$max" ]; then top=$(printf '%s\nGLIBC_2.28\n' "$max" | sort -V | tail -1) if [ "$top" != "GLIBC_2.28" ]; then echo "FAIL: glibc floor exceeded in $artifact ($max > 2.28) — was the build run outside the container?" exit 1 fi fi done - musl purity gate if
matrix.build == 'musl-container'for artifact in crates/tsv_napi/pkg/${{ matrix.triple }}/tsv_napi.node crates/tsv_napi/pkg/${{ matrix.triple }}/tsv; do # objdump runs alone first: inside the `if` pipeline its failure — exactly # what a missing or non-dynamic artifact produces — would read as "no # GLIBC_ refs" and pass the gate vacuously. objdump -T "$artifact" > /tmp/syms.txt if grep -q 'GLIBC_' /tmp/syms.txt; then echo "FAIL: musl artifact $artifact references GLIBC_ symbols" exit 1 fi done - Byte identity (PGO vs plain) if
matrix.build != 'musl-container'node scripts/pgo/pgo.ts byteid --triple ${{ matrix.triple }} - Byte identity (PGO vs plain, node:alpine) if
matrix.build == 'musl-container'docker run --rm -v "$PWD:/work" -v "$PWD/../corpora:/corpora:ro" -w /work \ node:24.14.1-alpine \ node scripts/pgo/pgo.ts byteid --triple ${{ matrix.triple }} --corpora /corpora - Depth shapes
CARGO_TARGET_DIR=.pgo/target-shapes node scripts/pgo/pgo.ts depth-shapes
- Depth contract (staged PGO addon) if
matrix.build != 'musl-container'node scripts/pgo/pgo.ts depth --triple ${{ matrix.triple }} - Depth contract (staged PGO addon, node:alpine) if
matrix.build == 'musl-container'docker run --rm -v "$PWD:/work" -w /work \ node:24.14.1-alpine \ node scripts/pgo/pgo.ts depth --triple ${{ matrix.triple }} - Size bounds
node scripts/roots/validate_napi_artifact.ts --triple ${{ matrix.triple }} --pgo - npm-shape test if
matrix.build != 'musl-container'node --test scripts/test_napi_npm.ts
- npm-shape test (node:alpine) if
matrix.build == 'musl-container'docker run --rm -v "$PWD:/work" -w /work node:24.14.1-alpine \ node --test scripts/test_napi_npm.ts
- uses
actions/upload-artifact, pinned to a commit
publish on ubuntu-24.04
- uses
actions/checkout, pinned to a commit - Install Node uses
actions/setup-node, pinned to a commit - uses
actions/download-artifact, pinned to a commit - Arrange platform packages
for d in crates/tsv_napi/pkg/napi-*; do mv "$d" "crates/tsv_napi/pkg/${d##*/napi-}" done ls crates/tsv_napi/pkg - Stage loader package
node scripts/roots/build_napi_packages.ts --loader-only
- Publish
flags=() if [ "$GITHUB_REF_TYPE" = "tag" ]; then flags+=(--expect-tag "$GITHUB_REF_NAME") fi if [ "$GITHUB_EVENT_NAME" = "schedule" ] || [ "$DRY_RUN" = "true" ]; then # schedule is ALWAYS dry-run — see the trigger comment. flags+=(--dry-run) elif [ "$GITHUB_REF_TYPE" != "tag" ]; then echo "::error::refusing a real publish off the non-tag ref '$GITHUB_REF_NAME' — dispatch it on the release tag" exit 1 else flags+=(--provenance) fi node scripts/roots/publish_napi.ts "${flags[@]}"
release on ubuntu-24.04, if github.ref_type == 'tag' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && !inputs.dry_run))
- uses
actions/checkout, pinned to a commit - Install Node uses
actions/setup-node, pinned to a commit - Release notes
node scripts/roots/release_notes.ts "$GITHUB_REF_NAME" > "$RUNNER_TEMP/release_notes.md" cat "$RUNNER_TEMP/release_notes.md"
- Collect assets from the registry
node scripts/roots/release_assets.ts "$GITHUB_REF_NAME" --out "$RUNNER_TEMP/assets" cat "$RUNNER_TEMP/assets/SHA512SUMS"
- Attest build provenance uses
actions/attest-build-provenance, pinned to a commit - Create GitHub Release
if gh release view "$GITHUB_REF_NAME" --json tagName >/dev/null 2>&1; then echo "Release $GITHUB_REF_NAME already exists — re-uploading assets only" gh release upload "$GITHUB_REF_NAME" "$RUNNER_TEMP"/assets/* --clobber else gh release create "$GITHUB_REF_NAME" "$RUNNER_TEMP"/assets/* --verify-tag \ --title "$GITHUB_REF_NAME" --notes-file "$RUNNER_TEMP/release_notes.md" fi
crates on ubuntu-24.04, if always() && needs.publish.result == 'success' && (needs.release.result == 'success' || needs.release.result == 'skipped')
- uses
actions/checkout, pinned to a commit - Install Rust
rustup toolchain install --no-self-update rustup show active-toolchain
- Install cargo-semver-checks uses
taiki-e/install-action, pinned to a commit - Install Node uses
actions/setup-node, pinned to a commit - Install npm dependencies
npm ci
- Publish crates (dry run)
flags=() if [ "$GITHUB_REF_TYPE" = "tag" ]; then flags+=(--expect-tag "$GITHUB_REF_NAME") fi npm run publish:crates -- "${flags[@]}"
tsv.fuz.dev
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 12, 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 a CI step, on a push or a pull request, that runs gro check with --build.
.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
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: Written: Fix the code, not the expectation — A check is silenced instead of satisfied
- In places: Tool: Suppressions that expire — A check is silenced instead of satisfied
- In places: Tool: Suites that fail on a skip — A gate stops gating
- In places: Shape: One gate definition — A gate stops gating
- In places: Tool: CI reruns the gate — A slow check gets skipped
- In places: Shape: Fast tools — A slow check gets skipped
- In places: Person: Approval before code, in tsv — A wrong claim gets acted on
- In places: Session: Check the claim against the code — A wrong claim gets acted on
- In places: Tool: Figures computed from reports — A wrong claim gets acted on
- In places: Tool: Link and drift checks — A stale statement is trusted
- In places: Session: Race the candidates — A predicted speedup that is not one
- In places: Tool: Committed size limits — A predicted speedup that is not one
- Throughout: Written: The correction is written down — A known mistake comes back
- In places: Tool: The gate — A known mistake comes back
- Throughout: Person: The maintainer releases — An unattended session does something irreversible
- In places: Tool: Deny rules and dry runs — An unattended session does something irreversible
Comparisons that name it
| Compared | Against | Kind | Runs | Source |
|---|---|---|---|---|
| tsv formatter | Prettier | Reference | Every change: fixtures, against a live Prettier Release: corpus diff | CI workflow |
| tsv formatter | Itself | Law | Every change: fixtures Release: corpus | corpus bundle |
| tsv formatter | Its input, reparsed | Law | Every change: fixtures Release: corpus | round-trip audit |
| tsv formatter | Its input, rendered | Law | Every change: fixtures Release: corpus | render audit |
| tsv parser | Svelte's parser, acorn-typescript and Svelte's CSS parser | Reference | Every change: fixtures, against the live parsers Release: corpus diff | fixture tests |
| tsv type stripping | ts-blank-space, with Node's type stripping as a cross-check | Reference | Every change: fixtures Release: corpus diff On demand: Node cross-check | strip fixtures |
| tsv import scanner | The canonical parsers' trees, and oxc-parser's module record | Reference | Every change: fixtures Release: corpus On demand: recordings against the parsers | import differential |
| tsv formatter | Itself, on mutated input | Law | Every change | fuzzer |
| tsv location wire | The reconstruction its npm package ships | Twin | Every change | loc cross-grade |
| tsv ignore matcher | git check-ignore | Reference | Every change | git oracle test |
| tsv WebAssembly build | tsv native build | Build | CI | engine parity |
| tsv parser | The test suites of Svelte's compiler and acorn-typescript | Suite | Release | suite conformance |
| tsv TypeScript parser | The TypeScript compiler's recorded baselines | Suite | Release | the oracle |
| tsv parser | test262 | Suite | Release | current results |
From Oracles in use.
Gates
- Types, tests, lints and format (every change): Type errors, regressions, lint errors and style drift. tsv.fuz.dev 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. tsv.fuz.dev is among the repos whose check script runs gro check.
- Build (ci): A broken build. tsv.fuz.dev 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. tsv.fuz.dev is among the repos with a CI step, on a push or a pull request, that runs gro check with --workspace.
- Pinned pass counts (every change): Conformance coverage that quietly shrinks or shifts. Where: pglet, and tsv's fixture validation.
- Links and anchors in Markdown (every change): A dead relative link or anchor in any Markdown file of the repo. Where: tsv.
- Size limits in CI (ci): A WebAssembly build or a native addon that has grown. Where: tsv and fuz_schema.
- Conformance against committed ledgers (release): A parser or formatter difference that no ledger records. Where: tsv.
- Wall time and instruction counts against a base (on demand): A performance regression: tsv fails a row past a committed percentage, and gro asks for a written reason. Where: gro and tsv.
- tsv's CI skips the two legs of its gate that read sibling checkouts, the wider Prettier round trip and corpus discovery
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
- Push a tag, which starts a release in CI for tsv and gro (tool refuses, permission rule, dry run by default): The push tool never sends a tag, and raw pushes are denied. The release script of tsv pushes its own tag, and changes nothing without an explicit flag.
- Publish a package (permission rule, dry run by default, written rule): The harness denies the publish commands, in settings that are not public. The release scripts of tsv, pglet and blake3 change nothing without an explicit flag, which a session could pass. The publish task of gro and the release task of fuz_forge have no such default.
- Create a package or a crate (written rule): Only a written rule: the release audit checks the crate graph, not new members, and tsv asks only that a new crate declare whether it publishes.
Rules that moved down
- Scan source for a delimiter with the cursor that skips comments and strings became: An audit in the gate that fails on any raw scan outside a reviewed list, each entry of which must still match a live site.
From Rules that moved down.
Values
The order tsv states its priorities in, highest first (The tsv README):
- correctness
- speed
- binary size, memory usage
- extensibility, modularity, reusability
Over every choice: staying simple.
- A decision: speed over size. Profile-guided builds for the shipped CLI and native addon. Cost: Larger binaries. performance
- A decision: speed over simplicity. A cleanup of a hot path is measured like any change, and refused when it costs time. Cost: Code that stays less tidy than it could be. performance
- A context: A tool that runs for a while. The usual order: speed first, then the binary and its memory. The tsv README
From the values page.