I tried Bazel and Buck2, but they were not very convenient to use. Are there any better options?
UPD: I forgot to mention that Cargo doesn't meet my needs.
I tried Bazel and Buck2, but they were not very convenient to use. Are there any better options?
UPD: I forgot to mention that Cargo doesn't meet my needs.
You can just use cargo, perhaps with a task runner like just
.
A strategy I've adopted for Rust programs that have to install a lot of data files such as man pages, shell completions, translation files etc is to have cargo build a 'bootstrap' binary which is only used to install those components. The advantage is that you get to do everything using Rust rather than some random domain specific language, you get all of the benefits of Rust's awesome error handling and memory safety (you can even use async or multi-threading) and you can even make the 'bootstrap' binary an optional thing to be built using Cargo features. I even created a crate for this purpose. I would imagine something similar might be of use for OS development if you need to populate a sysroot? The other advantage is you rarely encounter issues when building on a different host because your tasks are written using all of Rust's abstractions.
Short of that, I like to stick to the most platform agnostic tools possible, which generally means 'make' and being careful to not stray from POSIX when writing Makefiles. But not everyone seems to care about being able to build from different hosts.
this sounds a lot like the cargo xtask pattern.
I need a build system to link C libraries and create an ISO file. You mean I should create a Cargo command to handle this?