buck2 icon indicating copy to clipboard operation
buck2 copied to clipboard

Self-hosting open-source buck2

Open aherrmann opened this issue 3 years ago • 1 comments

AFAIK the open source version of buck2 can currently only be built with cargo. Making it self-hosting, i.e. to be able to build the open source buck2 with itself, could be a good milestone on the way to making it useful in open source use-cases. This came up in discussion with @arlyon on how to build the open source version of buck2.

aherrmann avatar Sep 21 '22 15:09 aherrmann

There has been some movement on this issue, and I believe we are close pending a rust toolchain to actually run the actions.

arlyon avatar Oct 03 '22 12:10 arlyon

We can actually build buck2 with buck2, and do in the open source CI.

ndmitchell avatar Aug 28 '23 13:08 ndmitchell

@ndmitchell Perhaps you would want to adjust the doc in https://github.com/facebook/buck2/blob/f014edfff62a78dc2868c580edb8950f456a65ec/docs/bootstrapping.md a bit.

Especially:

Note that the resulting binary will be compiled without optimisations or jemalloc, so we recommend using the Cargo-produced binary in further development.

Does it mean the buck2 build :buck2 binary now comes with Jemalloc and other optimizations as default?

sluongng avatar Aug 28 '23 13:08 sluongng

It's still true that we don't have Jemalloc. I think its probably also true that we don't have optimisations. I created #403 for that. I don't think its a big deal to do that (different toolchain with optimisations, onboard jemalloc) but it's a bit of work.

ndmitchell avatar Aug 28 '23 18:08 ndmitchell