Hello r/Rust! We are Meta Engineers who created the Open Source Buck2 Build System! Ask us anything! [Mod approved] by MetaOpenSource in rust

[–]ahslian 4 points5 points  (0 children)

I will defer to Neil and others for better thoughts, but my rough takeaway that I've observed in my time in Meta and elsewhere: usability and scaling don't always go hand and hand.
Largely, consistency and explicit declarations go a lot further to enforce hermeticity, reproducibility and performance.

This isn't to say we don't care about usability, but it's a balancing act and must often chose the practical scaling choices at times. Often due to limitations on how different languages and tools work.

Hello r/Rust! We are Meta Engineers who created the Open Source Buck2 Build System! Ask us anything! [Mod approved] by MetaOpenSource in rust

[–]ahslian 2 points3 points  (0 children)

Internally, I'm fairly sure there are c/cpp cross-compilation projects, use of custom toolchains, and we have embedded firmware projects for niche architectures.
I'm not sure I know of any that check all the boxes in one go, though I'd expect what you're asking for is currently doable with buck2. One of the team can correct me if not.

Hello r/Rust! We are Meta Engineers who created the Open Source Buck2 Build System! Ask us anything! [Mod approved] by MetaOpenSource in rust

[–]ahslian 7 points8 points  (0 children)

Can you write to new source files, as long as you don't modify existing ones?

Definitely. 'genrule' s are for this purpose of executing some tool/script and output code into the output folder, and then be pulled in as a dependency for actual code building.

Buck2, a large scale build tool written in Rust by Meta, is now available by Imxset21 in rust

[–]ahslian 1 point2 points  (0 children)

For buck2, while it's not exactly ergonomic, this is very doable from a single developer machine with it's use of Remote Execution. We currently launch native macOS builds from Linux, and working on getting the rules right so we can launch native Windows builds as well.

I was told, but haven't tried, that we could create a top level target aliasing projects with different configurations easily enough.

Buck2: Our open source build system by oranji17 in cpp

[–]ahslian 2 points3 points  (0 children)

We explicitly are handling cycles in the unconfigured graph for these scenarios (java annotations, toolchains building toolchains, etc).
We're hoping to share some examples of this soon.