Development and release
The development environment is defined by pixi.toml and pixi.lock. All
commands below run from the repository root through pixi run.
Everyday tasks
| Task | Purpose |
|---|---|
fmt / fmt-fix | Check or apply rustfmt to the workspace, fuzz crate and standalone ROS 2 example. |
clippy | Lint every workspace target and the ROS 2 codec example with -D warnings. |
test / tests | Run the full Rust workspace test suite. |
build | Build all workspace crates. |
docs | Build the book, API references and site, run doctests and check local links. |
schema-check | Validate schema sets and print the message-ID table. |
schema-build | Generate a Rust wrapper module from schema sets without a build.rs. |
rust-targets | Install the pinned embedded std targets into the pixi Rust sysroot. |
examples | Build and run all deterministic example self-tests, including the ROS 2 codec. |
examples-ros2-build | Build the r2r nodes; requires a sourced ROS 2 installation. |
check | Every local check, including docs and examples. |
ci | check plus the 60-second fuzz stage. |
wheels | Clean dist/, build the sdist and the x86_64/aarch64 manylinux wheels. |
c-release-archive | Build the C header/static/shared-library release tarball. |
release-check | Verify the exact tag, workspace version, changelog and artefacts. |
publish-dry-run | Package all publishable crates and verify the wheel and sdist. |
Specialised tasks cover golden vectors, the Python reference model, C ABI, Python bindings, embedded cross-builds, QEMU determinism and fuzzing. The Testing chapter lists them in the order used by CI.
CI requirements
GitHub Actions uses prefix-dev/setup-pixi with the committed pixi.lock, so
the pinned Rust toolchain, rustfmt, clippy, C++ compiler, Python, maturin and
documentation tools are installed automatically. The rust-targets task
downloads the matching Rust 1.100.0 standard libraries for
thumbv7em-none-eabi, thumbv7em-none-eabihf and
aarch64-unknown-linux-gnu into the pixi sysroot. qemu-system-arm is
installed in the workflow before the QEMU task. The README build badge links to
the GitHub Actions CI workflow.
Documentation build
pixi run docs performs these steps:
docs-doctestscompiles and runs public Rust examples.docs-bookbuilds the mdBook intodocs/book/book/.docs-rustruns rustdoc with warnings denied intotarget/doc/.docs-pythonuses pdoc on the installed extension intodocs/site/api/python/.docs-cruns Doxygen over the generated C header intodocs/site/api/c/html/and fails if the generated pages omit public C symbols.docs-sitecopies the book and rustdoc output intodocs/site/and writes the landing page.docs-linksrunslychee --offline --include-fragmentsover the sources and generated site.
All generated documentation is gitignored. Link checking is local: a docs build never requires network access. External URL checks are deferred to a stage on the 12-hour timer.
On every v* tag push, the documentation workflow runs pixi run docs and
publishes the generated docs/site/ to https://predsync.tgodfrey.com/ with
GitHub Pages, so the live site matches the released version. The
github-pages environment must allow v* tag deployments; configure that in
the repository’s environment protection rules. Cloudflare redirects the exact root path to
https://predsync.tgodfrey.com/book/index.html with a 301. The generated root
page also carries a client-side redirect and direct links to the
Rust API, the
Python API and the
C API as a fallback. The
canonical documentation URL remains the book.
The Cloudflare rule is configured outside the generated site. With
CLOUDFLARE_API_TOKEN (Zone > Single Redirect > Edit) and CLOUDFLARE_ZONE_ID
set, run pixi run docs-cloudflare-redirect to create or update it. The rule
matches http.host eq "predsync.tgodfrey.com" and http.request.uri.path eq "/",
then redirects to https://predsync.tgodfrey.com/book/index.html with status
301 and query strings not preserved. Matching only / avoids a loop with the
book and API paths. The equivalent dashboard rule is a Redirect Rule with the
same expression and target.
Release metadata
The root README.md, LICENSE and CHANGELOG.md are the public release front
door. The crates.io set is predsync-schema, predsync-core,
predsync-compiler and the predsync facade. Those four crates pin each other
with exact versions so a facade release cannot resolve against an incompatible
compiler or core. predsync-ffi, predsync-py, the test crates and the example
crates are publish = false.
The Python distribution is also called predsync. Its version is dynamic and
comes from [workspace.package] version; Cargo’s 0.1.0-rc.1 becomes PyPI’s
0.1.0rc1. Each publishable crate carries a copy of LICENSE so the licence
text appears in the crate archive and on crates.io.
Local version bumps
Install the release helper once:
cargo install cargo-release --locked
release.toml makes cargo-release update versions and the changelog, create
one commit and one vX.Y.Z tag, and push them. It never publishes to a
registry. The current development version is lower than the first release
candidate, so the first tag is explicit:
cargo release 0.1.0-rc.1 -x --no-publish
After the release candidate has been smoke-tested, promote it with:
cargo release release -x --no-publish
cargo release rc is deliberately not used: from 0.1.0-alpha.1 it would
produce 0.1.1-rc.1, not 0.1.0-rc.1. The facade crate owns the single
workspace tag and the CHANGELOG.md replacement, so a workspace release has
one tag rather than one tag per crate.
Publishing dry runs
pixi run publish-dry-run
The dry-run tool:
- lists each publishable Cargo crate with
cargo package --listand requiresCargo.toml,README.mdandLICENSE; - runs
cargo publish --workspace --dry-run; - builds a Python wheel and sdist into a temporary directory;
- installs the sdist in a clean virtualenv from a directory containing no repository checkout, proving the path-dependent workspace crates are in it;
- never uploads anything.
The scheduled GitHub Actions workflow runs publish-dry-run every 12 hours.
Tag builds run the same checks in release-verify before any upload.
Tag-driven release
The release workflow is .github/workflows/release.yml. It runs only on v*
tag pushes, so ordinary branch and pull-request builds can never publish.
The workflow performs:
verify—release-checkrequires an exact tag atHEAD, a clean tree,TAG_NAME == v$(workspace version)and a matching changelog heading. It then runsciandpublish-dry-run.build-wheels— builds the sdist plus the x86_64 and aarch64manylinux2014wheels in clean containers.build-c-archive— builds the C header, static library and shared library tarball.publish— waits at the protected GitHubreleaseenvironment for manual approval. Credentials are bound only inside this job.publish_crates.pychecks crates.io for each crate/version, waits for dependencies to become indexed, skips versions already published and publishes the rest in dependency order.publish_pypi.pyuploads only the expected wheels and sdist withmaturin upload --skip-existing.
Configure the repository before the first release:
- add repository secrets
CARGO_REGISTRY_TOKENandMATURIN_PYPI_TOKEN; - create a GitHub Environment named
release; - add required reviewers to that environment;
- optionally protect
v*tags.
The first upload needs temporary broad tokens because project-scoped tokens cannot be created before the crate or project exists. Rotate to scoped tokens after the release candidate is live. Duplicate crate versions fail loudly; PyPI uploads can be retried safely.
Scheduled maintenance
.github/workflows/scheduled.yml runs the 30-minute fuzz acceptance stage, the
full differential trace set and the publishing dry run every 12 hours.
C release archive and documentation
Every tag build archives predsync.h, the static library, the shared library,
the README and the licence as predsync-c-X.Y.Z.tar.gz. The GitHub Actions
documentation workflow publishes on v* tags only, so the book and API pages
match the released version. The docs task fails if Doxygen output omits public
C symbols.
Before tagging a release
- Run
pixi run ciand confirm the 60-second fuzz stage is clean. - Run the timer-only stages if the change affects the wire format or predictors.
- Run
pixi run docsand inspectdocs/site/index.html. - Confirm
CHANGELOG.mdnames every user-visible change underUnreleased. - Confirm generated files are current:
pixi run c-header-check. - Run
pixi run publish-dry-runandpixi run wheels. - Create the tag with
cargo release, push it, and wait for the GitHub Actionsreleaseenvironment approval gate. Smoke-test the release candidate wheels before approving the final0.1.0release.