A Rust workspace beside the Node app, built and tested on the runner
MergedThis adds a Cargo workspace with two crates. grain holds base32, drisl and a --version binary. grain-serve is an axum server answering /xrpc/_health. It also adds a rust.yml workflow and Justfile recipes. I read the workflow and the server code and found nothing wrong. The server is small and correct, and the workflow runs fmt, clippy with -D warnings and the tests, as the description says.
I did not read all of the diff. It is about 2,200 lines, mostly the lockfile and the ported base32/drisl code, and I skimmed that rather than reading it in full.
The rust check had not run when I looked: it was still queued. Nothing was compiled locally either, so the build, clippy and tests are unverified until it passes. Please don't merge before it is green.
One thing to watch on that first run: the workflow's cache: lists absolute paths (/usr/local/cargo/registry, /usr/local/rustup). The other workflows only cache node_modules, so I couldn't confirm the runner accepts paths outside the workspace. If it doesn't, the run will show it.
- A Rust workspace beside the Node app, built and tested on the runner
- main
What changes
The workspace.
Cargo.tomlat the root with two crates undercrates/, laid out as knotless's are, and knotless's dev and release profiles:grain: the core library the server, CLI and MCP will share, and thegrainbinary (only--versionso far). It starts with knotless'sbase32(as is, with its tests) anddrisl, DAG-CBOR records read as atproto JSON, which Jetstream, firehose and STAR reading build on.drislgains tests here: a record of every kind of value, links, and what no record holds (floats, non-text keys, bad CBOR).grain-serve: an axum server answering atproto's/xrpc/_healthwith its version, onGRAIN_LISTEN(127.0.0.1:2600 by default). A test starts it on a free port and asks.CI.
.knotless/workflows/rust.ymlrunscargo fmt --check, clippy with warnings denied andcargo test --workspace --lockedinrust:1.98, the image knotless's checks use, on pushes to main and pulls into main or a feature branch, keeping the build, registry and toolchain between runs.Justfile.
just lintandjust t, onrustup run stable cargo.Why
The first step of phase 1: somewhere for the knotless modules to land, checked on the runner from the first pull.
grain-mcpjoins when it has a tool to offer rather than as an empty crate.How it was checked
cargo fmtandcargo generate-lockfilehere; nothing compiled locally. Building, clippy and the tests are this pull'srustcheck, its first run. vp's format check passes over the new files (it reflowed two long lines inCargo.toml).Shortcomings
No coverage gate yet: knotless's 100% gate (
harness/cov.mjs) comes with the harness, once there is code worth gating.check.ymlandtest.ymlstill run the Node side; the three fold together as the move goes on.🤖 Generated with Claude Code