Dune makes it very easy to build shared objects (*.so) so that OCaml libraries can be used from C. You can see a minimal example here. To give you an overview of this example, here is the dune file for the shared library: (library (name lib) (public_name binding-example) (modules lib)) (executable (name CAPI) (libraries binding-example) (foreign_stubs (language c) (names cstub)) (flags :standard -linkall) (modes (native shared_object)) (modules CAPI)) (install (section lib) (files ...| OCaml
Hello I am a bit lost. $ opam install lablgl The following actions will be performed: === remove 2 packages ⊘ base-effects base [conflicts with ocaml] ⊘ ocaml-compiler 5.3.0 === downgrade 2 packages ↘ ocaml 5.3.0 to 5.1.1 [required by lablgl] ↘ ocaml-base-compiler 5.3.0 to 5.1.1 [required by ocaml] However opam show lablgl gives me depends "ocaml" {>= "4.14"} "ocamlfind" {>= "1.2.1"} "camlp-streams" {build} ...| OCaml
Why Lean 4 replaced OCaml as my Primary Language| OCaml
I’ve been coding in OCaml and using opam for quite a long time now. I’ve still not managed to install a local directory without first creating a git commit. It’s a papercut I’ve worked my way around for a long time now. Specifically, running e.g. opam install . --switch=myswitch will not install the current folder if I have not commited my last changes. Which is annoying, sometimes I just want to install whatever my current work is. I think the most annoying part is the fact that opam...| OCaml