-
Notifications
You must be signed in to change notification settings - Fork 2.9k
REAPI (Google/Bazel Remote Execution API) Support #7468
Copy link
Copy link
Open
Labels
A-build-executionArea: anything dealing with executing the compilerArea: anything dealing with executing the compilerA-networkingArea: networking issues, curl, etc.Area: networking issues, curl, etc.C-enhancementCategory: enhancementCategory: enhancementC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`PerformanceGotta go fast!Gotta go fast!S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Metadata
Metadata
Assignees
Labels
A-build-executionArea: anything dealing with executing the compilerArea: anything dealing with executing the compilerA-networkingArea: networking issues, curl, etc.Area: networking issues, curl, etc.C-enhancementCategory: enhancementCategory: enhancementC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`PerformanceGotta go fast!Gotta go fast!S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Building large Rust projects can often be done in parallel thanks to the large dependency trees which tend to result from any non-trivial project. It would be nice to be able to parallelise this onto multiple systems. In the C/C++ world, one might use distcc to do this, in the modern(?) world this is often done via a mechanism such as REAPI.
Describe the solution you'd like
It would be wonderful if Cargo were able to be configured to use an REAPI service to run builds. Obviously the REAPI service would have to provide a platform with a compatible compiler but given that existing, it ought to be possible for common builds to parallelise in this way.
Notes
REAPI requires that the full set of inputs be understood for sending to the REAPI executor. This can be naïvely done by sending the entire outer crate's contents including target contents each time, along with the command needing running. These wouldn't be too complex to construct without even downloading the intermediates from the REAPI service which should minimise the cost of constructing such maximal jobs.
I have some experience of REAPI through my job and would be pleased to discuss this further, indeed if it might be possible to prototype this as a RUSTC_WRAPPER then I'd be up for discussing writing such, though I feel it'll need to be in cargo proper eventually because it affects the number of parallel jobs you could be running.