The following example is a minimal example of a simple rust project consisting of a binary, library and external crates. This can be handled by Bazel.
-
Clone his repo
-
Change the target in
Cargo.toml
under[raze]
to fit your targetMac OSX:
target = "x86_64-apple-darwin"
Linux 64-bit:
target = "x86_64-unknown-linux-gnu"
Windows 64-bit
target = "86_64-pc-windows-msvc"
-
cargo install cargo-raze
-
cargo generate-lockfile
only needed when there is no Cargo.lock file -
cargo raze
-
bazel build :hello_world