A very much WIP tool that let's you use buck2 to build your rust projects without needing to write your own rules.
As a general rule, users should not need to care about the generated BUCK files, and their build cacheability should automagically improve!
The main goals for this project are
- Automatically generate BUILD files from existing
Cargo.toml/Cargo.lockfiles. - Treat
Cargo.tomlas the source of truth - Resolve deps/features in the same way that cargo does (we use the
cargocrate for this) - Add new optional enhancements to the build process
- Provide many pre-build "fixups" to allow different crates to compile correctly (
zstd-sys,libsqlite3_sys,aws_lc_sys, etc...) - In general if a crate does not compile, we will try to add a "fixup" for it.
- Ability to mark a proc-macros as "sandboxed", so we won't need to re-run it if the inputs did not change.
- Ability to explicitly name inputs to a build-script (files/environment variables) so we don't need to re-run it if the inputs did not change
Example projects
- Simple no dependency bin
- Simple single dependency bin
- Simple no dependency build-script
- Proc macro dependency bin
- Simple workspace
Features
- Package renaming (https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml)
- Cargo env vars (https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates)
- dtolnay: for all your work on rust, the ecosystem, buck2 and reindeer. Thank you!❤️