These are things that need to be done once to get going.
These commands install the buck2
and reindeer
binaries into '~/.cargo/bin'.
cargo install --git https://github.com/facebook/buck2.git buck2
cargo install --git https://github.com/facebookincubator/reindeer.git reindeer
Note: Make sure after installing them to configure your PATH
environment variable so they can be found.
If you haven't already, install opam.
When opam has been installed execute ~/.ocaml-setup.sh
from the root of the distribution. The effect of ocaml-setup.sh
is to create symlinks in shim/third/party/ocaml
that point into the local opam installation.
Note: The script assumes that OPAM_SWITCH_PREFIX
has been set by the way.
Reindeer is a a tool that imports Rust crates from crates.io and generates Buck2 build rules for them. Run it from the root of the ocamlrep repository like this.
reindeer --third-party-dir shim/third-party/rust vendor && \
reindeer --third-party-dir shim/third-party/rust buckify
That's it, you're all set.
Run this command from the root of the repository to build all the targets you can.
buck2 build root//...
To run all the tests you can, replace build
with test
in the above command.
More examples and more detail about building with Buck2 are available on the Buck2 website!