To develop, build and test Trow, an sqlx development database is required.
The TL;DR is mkdir -p target && cargo sqlx database setup
, more information can be found at
https://github.com/launchbadge/sqlx/blob/main/sqlx-cli/README.md.
The easiest way to build and test Trow is by using the Containerfiles and associated scripts. If you want a local binary, the Trow executable can be copied out of the final image. The only dependency for building Trow in this way is Docker or Podman.
Trow is written in Rust.
To compile Rust locally, first install rustup if you
haven't already. Set the compiler default to nightly with rustup default nightly
and run rustup component add rustfmt
. Then run rustup update
to make sure you're running a version of Rust with
rustfmt
component. Now you should be able to run cargo build
from the project root and the Trow
binary will be written to /target/debug/trow
.
To execute the binary, you can run cargo run
, which will first recompile Trow if anything has
changed.
There are multiple ways to test Trow:
cargo test
cargo test --lib --bins
to run only unit testscargo test --test '*'
to run only integration tests
cargo test -- --ignored
to run the smoke tests./run_oci_conformance_tests.sh
to run the OCI conformance tests