-
Rust Toolchain: You need the
rust
toolchain corresponding torust-toochain.md
installed. Install Rust withrust-up
and anycargo
invocations will then automatically respect the toolchain. -
Command runner
just
. -
The Cargo plugin
cargo-watch
for continuous building. -
Container manager such as
podman
,docker
for some tooling (formatting etc.).
If you have the package manager
nix
installed you can
enter a development setup easily with
nix ./tools/nix#default
or just nix-develop
or automatically when direnv
is
installed and setup for your shell and
direnv allow
was executed inside the repository.
Note: Make sure to enable flakes
and nix-command
in
your nix
config
To format the whole project run
just format
Note: If you use docker
, use just container_mgr=docker format
To build the tool with cargo
run
just build
and for continuous building (needs):
just watch
To run the tests do
just test
To build the package with Nix run:b
just nix-package
To build the image with Nix run:
just nix-image
CI is run with some container images which can be updated with:
just upload-ci-images [<version>] [<registry>]
where the <version>
should be a semantic version. Note: By default it will
upload and overwrite the current version.
To prepare a release you can execute:
just release <sem-version>
It will:
-
Check that the version is semantic version and the version does not exists (local and remote) and it is newer then all remote version.
-
Update the
Cargo.toml
and make a commit onmain
. -
Push a prepare tag
prepare-v<version>
which triggers therelease.yaml
pipeline.
Note: If the release pipeline fails, you can just run this same command again.
Also rerun it when you made a mistake, it will cancel the current release (works
also when --amend
ing on the current commit)
A benchmarking script is provided in tools/bench/benchmark.sh
, along with a nix devshell. To run the benchmark in the isolated environment, run:
just nix-develop-bench bash ./tools/bench/benchmark.sh