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 byKindDeclared inThrough
gro runtimeCargo.toml(registry)tsv_ts
gro runtimepackage.json@fuzdev/tsv
tsv-format (vscode-extension-tsv-format)runtimepackage.json@fuzdev/tsv-format-wasm
blake3 devpackage.json@fuzdev/tsv

What it uses

UsesKindDeclared inThrough
blake3 devpackage.json@fuzdev/blake3-wasm
blake3 (declared by tsv.fuz.dev)devpackage.json@fuzdev/blake3-wasm
fuz_code (declared by tsv.fuz.dev)devpackage.json@fuzdev/fuz_code
fuz_css (declared by tsv.fuz.dev)devpackage.json@fuzdev/fuz_css
fuz_schema devpackage.json@fuzdev/fuz_schema
fuz_schema (declared by tsv.fuz.dev)devpackage.json@fuzdev/fuz_schema
fuz_ui (declared by tsv.fuz.dev)devpackage.json@fuzdev/fuz_ui
fuz_util devpackage.json@fuzdev/fuz_util
fuz_util (declared by tsv.fuz.dev)devpackage.json@fuzdev/fuz_util
gro devpackage.json@fuzdev/gro
gro (declared by tsv.fuz.dev)devpackage.json@fuzdev/gro
mdz (declared by tsv.fuz.dev)devpackage.json@fuzdev/mdz
svelte-docinfo (declared by tsv.fuz.dev)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

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

  1. uses actions/checkout, pinned to a commit
  2. Install Rust
    rustup toolchain install --no-self-update
    rustup show active-toolchain
    cargo --version
  3. uses Swatinem/rust-cache, pinned to a commit
  4. Verify Cargo.lock is current
    cargo metadata --locked --format-version 1 > /dev/null
  5. Install Node
    uses actions/setup-node, pinned to a commit
  6. Install npm dependencies
    npm ci
  7. Install the sidecar's npm dependencies
    npm ci --prefix crates/tsv_debug/sidecar
  8. Check
    npm run check

artifacts 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. uses Swatinem/rust-cache, pinned to a commit
  4. Install wasm-pack
    uses taiki-e/install-action, pinned to a commit
  5. Install Node
    uses actions/setup-node, pinned to a commit
  6. Install npm dependencies
    npm ci
  7. Build packages
    npm run build:packages
  8. Validate artifact sizes
    npm run validate:artifacts
  9. Node package tests
    npm run test:npm:run
    npm run test:npm:parse:run
    npm run test:npm:all:run
  10. N-API npm package test (linux)
    npm run test:napi:npm
  11. Validate N-API artifact sizes (linux)
    npm run validate:napi
  12. Depth contract, napi profile
    npm run test:depth:napi
  13. Engine parity (wasm vs native)
    npm run engines:audit
  14. Depth contract, WASM engine
    npm run test:depth:wasm
  15. Crates packaging (publish dry run)
    npm run publish:crates:package

platforms on ${{ matrix.os }}

  1. uses actions/checkout, pinned to a commit
  2. Install Rust
    rustup toolchain install --no-self-update
    rustup show active-toolchain
  3. uses Swatinem/rust-cache, pinned to a commit
  4. Install Node
    uses actions/setup-node, pinned to a commit
  5. Install the sidecar's npm dependencies
    npm ci --prefix crates/tsv_debug/sidecar
  6. Test
    cargo test --locked --workspace --no-fail-fast
  7. N-API boundary test if ${{ !cancelled() }}
    npm run test:napi
  8. 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 }}

  1. 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
  2. uses actions/checkout, pinned to a commit
  3. 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
  4. if matrix.build == 'native'
    uses Swatinem/rust-cache, pinned to a commit
  5. if matrix.build != 'native'
    uses actions/cache, pinned to a commit
  6. Install Node
    uses actions/setup-node, pinned to a commit
  7. Fetch the training corpus
    mkdir -p .pgo
    node scripts/pgo/pgo.ts corpora --fetch
  8. Build plain + instrumented (native) if matrix.build == 'native'
    cargo build --locked -p tsv_cli --release
    sh scripts/pgo/build.sh instrument .pgo
  9. 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'
  10. 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'
  11. Stage the instrumented pair
    node scripts/pgo/pgo.ts stage --phase instrument --triple ${{ matrix.triple }}
  12. Train if matrix.build != 'musl-container'
    node scripts/pgo/pgo.ts train --triple ${{ matrix.triple }}
  13. 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
  14. Merge the profiles
    node scripts/pgo/pgo.ts merge --triple ${{ matrix.triple }}
  15. Build profile-use (native) if matrix.build == 'native'
    sh scripts/pgo/build.sh use .pgo
  16. 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'
  17. 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'
  18. 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 }}
  19. Stage platform package
    node scripts/pgo/pgo.ts stage --phase use --triple ${{ matrix.triple }}
  20. 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
  21. 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
  22. Byte identity (PGO vs plain) if matrix.build != 'musl-container'
    node scripts/pgo/pgo.ts byteid --triple ${{ matrix.triple }}
  23. 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
  24. Depth shapes
    CARGO_TARGET_DIR=.pgo/target-shapes node scripts/pgo/pgo.ts depth-shapes
  25. Depth contract (staged PGO addon) if matrix.build != 'musl-container'
    node scripts/pgo/pgo.ts depth --triple ${{ matrix.triple }}
  26. 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 }}
  27. Size bounds
    node scripts/roots/validate_napi_artifact.ts --triple ${{ matrix.triple }} --pgo
  28. npm-shape test if matrix.build != 'musl-container'
    node --test scripts/test_napi_npm.ts
  29. 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
  30. uses actions/upload-artifact, pinned to a commit

publish on ubuntu-24.04

  1. uses actions/checkout, pinned to a commit
  2. Install Node
    uses actions/setup-node, pinned to a commit
  3. uses actions/download-artifact, pinned to a commit
  4. 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
  5. Stage loader package
    node scripts/roots/build_napi_packages.ts --loader-only
  6. 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))

  1. uses actions/checkout, pinned to a commit
  2. Install Node
    uses actions/setup-node, pinned to a commit
  3. Release notes
    node scripts/roots/release_notes.ts "$GITHUB_REF_NAME" > "$RUNNER_TEMP/release_notes.md"
    cat "$RUNNER_TEMP/release_notes.md"
  4. Collect assets from the registry
    node scripts/roots/release_assets.ts "$GITHUB_REF_NAME" --out "$RUNNER_TEMP/assets"
    cat "$RUNNER_TEMP/assets/SHA512SUMS"
  5. Attest build provenance
    uses actions/attest-build-provenance, pinned to a commit
  6. 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')

  1. uses actions/checkout, pinned to a commit
  2. Install Rust
    rustup toolchain install --no-self-update
    rustup show active-toolchain
  3. Install cargo-semver-checks
    uses taiki-e/install-action, pinned to a commit
  4. Install Node
    uses actions/setup-node, pinned to a commit
  5. Install npm dependencies
    npm ci
  6. 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

  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

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
tsv formatterPrettierReference
Every change: fixtures, against a live Prettier
Release: corpus diff
CI workflow
tsv formatterItselfLaw
Every change: fixtures
Release: corpus
corpus bundle
tsv formatterIts input, reparsedLaw
Every change: fixtures
Release: corpus
round-trip audit
tsv formatterIts input, renderedLaw
Every change: fixtures
Release: corpus
render audit
tsv parserSvelte's parser, acorn-typescript and Svelte's CSS parserReference
Every change: fixtures, against the live parsers
Release: corpus diff
fixture tests
tsv type strippingts-blank-space, with Node's type stripping as a cross-checkReference
Every change: fixtures
Release: corpus diff
On demand: Node cross-check
strip fixtures
tsv import scannerThe canonical parsers' trees, and oxc-parser's module recordReference
Every change: fixtures
Release: corpus
On demand: recordings against the parsers
import differential
tsv formatterItself, on mutated inputLaw
Every change
fuzzer
tsv location wireThe reconstruction its npm package shipsTwin
Every change
loc cross-grade
tsv ignore matchergit check-ignoreReference
Every change
git oracle test
tsv WebAssembly buildtsv native buildBuild
CI
engine parity
tsv parserThe test suites of Svelte's compiler and acorn-typescriptSuite
Release
suite conformance
tsv TypeScript parserThe TypeScript compiler's recorded baselinesSuite
Release
the oracle
tsv parsertest262Suite
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.

From Actions kept with a person.

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):

  1. correctness
  2. speed
  3. binary size, memory usage
  4. 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.