Sets of libraries and tools to write applications and libraries mixing OCaml and Rust. These libraries will help keeping your types and data structures synchronized, and enable seamless exchange between OCaml and Rust
MIT License
Instructions on how to setup a Buck2 build of ocamlrep. More Buck2 information & examples can be found on the Buck2 website.
Get the latest prebuilt buck2
binary (and symlink it into '/usr/local/bin').
wget https://github.com/facebook/buck2/releases/download/latest/buck2-"$PLAT".zst
zstd -d buck2-"$PLAT".zst -o buck2
chmod +x buck2
sudo ln -s "$(pwd)"/buck2 /usr/local/bin/buck2
Valid values for $PLAT
are x86_64-unknown-linux-gnu
on Linux, x86_64-apple-darwin
on x86 macOS and aarch64-apple-darwin
on ARM macOS.
Initialize a Buck2 prelude Git submodule.
git submodule update --init
Reindeer is a tool to generate Buck2 rules for Rust crates.
Install the reindeer
binary from source (into '~/.cargo/bin').
cargo install --git https://github.com/facebookincubator/reindeer.git reindeer
Initialize OPAM.
opam init --compiler=5.1.1 --disable-sandboxing -y
eval $(opam env)
Run the script 'ocaml-setup.sh'.
./ocaml-setup.sh
Note: The script assumes that OPAM_SWITCH_PREFIX
is set.
Run reindeer buckify
.
reindeer --third-party-dir shim/third-party/rust buckify
Build the complete set of ocamlrep targets.
buck2 build root//...