The fixups system allows you to handle complex third-party crate requirements, such as running build.rs scripts or managing C dependencies.
Running Build Scripts (build.rs)
To instruct Reindeer to compile and run a crate's build script and transform its stdout into rustc flags, use the buildscript.run option in a fixup configuration.
buildscript.run = true
Providing Cargo Environment Variables
If a build script relies on Cargo environment variables (like env!("CARGO_PKG_NAME")), you must explicitly enable them, as Buck does not provide these by default:
cargo_env = true
buildscript.run = true
Handling C Dependencies (cxx_library)
For crates that use the cc crate to invoke a C compiler (e.g., blake3, zstd), you can manually translate cc invocations into [[cxx_library]] fixups. Reindeer converts these into cxx_library targets for Buck. For complex crates like zstd or winapi, check the Buck2 repository's fixups folder for existing implementations.
# Example: Enabling build script and cargo env
cargo_env = true
buildscript.run = true