pglet

native and data · early · Rust

pglet 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
fuz_app optional peerpackage.json@fuzdev/pglet-wasm
fuz_forge devpackage.json@fuzdev/pglet-wasm

What it uses

UsesKindDeclared inThrough
fuz_util devpackage.json@fuzdev/fuz_util
gro devpackage.json@fuzdev/gro

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: bytes, console_error_panic_hook, crc32fast, futures-util, getrandom, js-sys, lru, parking_lot, phf, postcard, rusqlite, serde, serde_json, tempfile, thiserror, time, tokio, tokio-postgres, uuid, wasm-bindgen, wasm-bindgen-futures, web-sys

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:

cargo clippy --workspace --all-targets -- -D warnings && npm run check:stripped && npm run check:wasm-features && cargo fmt --check && npm run check:docs && npm run check:ts && npm run check:benches && npm run check:release

How its CLAUDE.md comments its check command:

  • npm run check  # clippy -D warnings + stripped + wasm-features + fmt + docs + check:ts + check:benches + release audit
    line 568

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

hermetic 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. Install Node
    uses actions/setup-node, pinned to a commit
  5. Install npm dependencies
    npm ci
  6. Verify Cargo.lock is current
    cargo metadata --locked --format-version 1 > /dev/null
  7. Check
    npm run check
  8. Test
    npm run test:rust

package 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. Package tests
    npm run test:npm
  8. Size cap
    npm run size:check
  9. OPFS build
    npm run wasm:build:opfs && grep -q 'class PgletBtreePersistent' crates/pglet_wasm/pkg-opfs/pglet_wasm.d.ts

differential 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 Node
    uses actions/setup-node, pinned to a commit
  5. Install the Postgres 18 client
    sudo install -d /usr/share/postgresql-common/pgdg
    sudo curl -sS -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc \
      https://www.postgresql.org/media/keys/ACCC4CF8.asc
    echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] \
      https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" \
      | sudo tee /etc/apt/sources.list.d/pgdg.list > /dev/null
    sudo apt-get update
    sudo apt-get install -y --no-install-recommends postgresql-client-18
    echo /usr/lib/postgresql/18/bin >> "$GITHUB_PATH"
  6. Verify the Postgres clients
    psql --version
    pg_dump --version
    test "$(pg_dump --version | grep -oE '[0-9]+' | head -1)" -ge 18
  7. Differential gates
    cargo xtask gates --check --only test:fixtures,test:fixtures:profile-lock,test:dump,test:pg-dump,test:copy,test:keywords
  8. Upload gate logs if ${{ failure() }}
    uses actions/upload-artifact, pinned to a commit

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
pgletPostgresReference
Every change
fixtures

From Oracles in use.

Gates

  • Types, tests, lints and format (every change): Type errors, regressions, lint errors and style drift. Where: The repos whose check script runs gro's check, with lints where the repo has a lint config. pglet's check script reaches it through a script of its own, for its TypeScript.
  • Drift in generated files (every change): A generated file that no longer matches its source. Where: The repos whose check script runs gro's check, and pglet's TypeScript the same way.
  • Release audit (every change): A forbidden crate or a test-only feature in a release build, a broken layering rule, and a copied lint table that has drifted. Where: fuz, fuz_forge and zap. pglet runs an audit of its own, for its test-only crate alone.
  • Pinned pass counts (every change): Conformance coverage that quietly shrinks or shifts. Where: pglet, and tsv's fixture validation.
  • Size limits in the gate set (every change): A WebAssembly build that has grown. Where: pglet.
  • pglet's CI leaves out the WebAssembly and concurrency suites of its gate set

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

  • 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.

From Actions kept with a person.

Values

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

  1. size, startup
  2. feature completeness
  • A decision: correctness over speed. Float text written digit for digit as PostgreSQL writes it. Cost: A measured slowdown against the faster formatting. tradeoffs
  • A context: A database for tests. pglet aims to beat PGlite on startup and size, and its throughput only has to stay within a factor of SQLite's. pglet's plan

From the values page.