Note: This binding has its own independent version number, which may differ from the Rust core version. When checking for updates or compatibility, always refer to this binding's version rather than the core version.
- OCaml version > 4.03 and < 5.0.0
We recommend using OPAM the OCaml Package Manager to install and manage the OCaml environment.
The quickest way to get the latest opam up and working is to run this script:
bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)"Similarly, you can also use your distribution's package manager to install
pacman -S opamapt-get install opambrew install opamDo not put sudo in front of any opam commands. That would break your OCaml installation.
After Installing OPAM, we need to initialize it
For the general case, we can execute
opam init --bare -a -yIf you are using WSL1 on windows, run:
opam init --bare -a -y --disable-sandboxingUsing opam, we can have multiple versions of ocaml at the same time; this is called switch.
Due to the upstream ocaml-rs, we currently do not support OCaml5, and recommend using the latest version of OCaml4
We can create use this command:
opam switch create opendal-ocaml4.14 ocaml-base-compiler.4.14.0
eval $(opam env)OpenDAL does not depend on opam package except ounit2 for testing.
However, to facilitate development in an IDE such as vscode, it is usually necessary to install the following content
opam install -y utop odoc ounit2 ocaml-lsp-server ocamlformat ocamlformat-rpccd bindings/ocaml
dune buildTo execute unit tests, we can simply use the following command:
cd bindings/ocaml
dune testLicensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.