A Cap'n Proto JSON codec for
capnp-rust, wire-compatible
with the C++ capnp::JsonCodec.
The published crate lives in crates/capnp-json/ — see
its README for usage and supported features,
or the rendered API docs at https://docs.rs/capnp-json.
capnp-json follows SemVer. While the crate is on
0.x, breaking changes bump the minor version (0.1.0 → 0.2.0) and
backward-compatible changes bump the patch version (0.1.0 → 0.1.1).
Releases are cut by the
Release workflow. To publish a new
version:
- Make sure
mainis green on CI and contains everything you want in the release. - From the GitHub Actions tab, run Release via Run workflow and
enter the new version (e.g.
0.2.0, novprefix).
The workflow then:
- bumps
versionin the rootCargo.toml(and the install snippet in the crate README on minor bumps); - refreshes
Cargo.lockand runscargo test --workspace; - runs
cargo publish --dry-runas a sanity check; - commits the bump as
Release vX.Y.Z, tagsvX.Y.Z, and pushes both; - publishes to crates.io;
- creates a GitHub release with auto-generated notes.
docs.rs picks up the new version from crates.io automatically — give it a few minutes and check https://docs.rs/capnp-json.
CARGO_REGISTRY_TOKENrepository secret — a crates.io API token from https://crates.io/me, scoped topublish-updateforcapnp-json.- The default
GITHUB_TOKENis enough for the commit/tag push and release creation, providedmaindoesn't have branch protection that blocks pushes fromgithub-actions[bot]. If it does, either relax the rule for the bot or swap in a fine-grained PAT.
Licensed under the MIT License.
Copyright (c) 2025 Ben Jackson and Cap'n Proto contributors.