This repository contains Rust crates for internal use within Silitics. While the crates are open-source and you are free to use them for whatever purpose you see, we will not accept any contributions other than bug fixes.
| Crate | Purpose |
|---|---|
anyver |
Parse and compare versions of any scheme, such as SemVer and CalVer. |
byte-calc |
Calculate with numbers of bits, bytes, and blocks. |
reportify |
Report errors with structured context, causes, and backtraces. |
si-crypto-hashes |
Compute, parse, and display cryptographic hash digests. |
si-fs |
Replace files atomically and durably. |
si-observability |
Set up logging, tracing, and OTLP export for applications. |
Install Nix with flakes enabled and mise, then run:
mise install
mise run check # Formatting, lints, docs, dependencies, and every feature.
mise run test # Tests on the pinned nightly and on stable Rust.
mise run check:msrv # Every feature with each crate's minimum Rust version.
mise run check:semver # API changes against the latest releases on crates.io.
mise run fuzz # Every fuzz target for 30 seconds, or FUZZ_SECONDS.Mise supplies the pinned nightly toolchain, and the tasks enter the Nix environment for the other tools on Linux. Declare dependencies in the workspace manifest and inherit them in crates.
Dependabot updates actions and Cargo.lock weekly. Monthly, update the nightly in
mise.toml, the Nix inputs with nix flake update, and dependencies with new major
versions.
Each crate is released on its own. To release a crate, bump its version in its
Cargo.toml, update Cargo.lock and the crate's CHANGELOG.md, and merge the change.
Then tag the merged commit with <crate>-v<version> and push the tag, for example:
git tag anyver-v0.2.0
git push origin anyver-v0.2.0The Release workflow checks that the tag matches the crate's version, runs the crate's
tests, and publishes the crate to crates.io. It authenticates through crates.io trusted
publishing and runs in the crates-io environment, so each crate must list this
repository's release.yml workflow as a trusted publisher on crates.io.
Trusted publishing only works for crates that already exist on crates.io. Publish the
first release of a new crate by hand with cargo publish -p <crate> and an API token of
an owner of the crate. Then add the trusted publisher on crates.io: repository
silitics/rust-libs, workflow release.yml, environment crates-io. Later releases go
through the Release workflow.