I notice that included in the source of the OpaWhiteBoard example, there is a .ml file here: https://github.com/hhugo/OpaWhiteBoard/blob/master/src/opacairo/cairo.ml
This appears to be OCaml with some directives ("##"). I'm guessing this means it's possible to write extensions to Opa in OCaml, correct?
Your libraries are installed to the directory returned by opam var lib , which is by default ~/. opam/<switch>/lib .
opam switchThis command enables the user to have several installations on disk, each with their own prefix, set of installed packages, compiler version, etc. Use cases include having to work or test with different OCaml versions, keeping separate development environments for specific projects, etc.
You need to disable the sandbox by using opam init --disable-sandboxing . bwrap is the tool that is creating sandboxes.
Yes you can with OPA-plugin-builder.
The book is still a work in progress (http://opalang.org/resources/book/index.html) and we will complete the plugin builder part as soon as we can.
But you can guess how it works looking at the Makefile: https://github.com/hhugo/OpaWhiteBoard/blob/master/Makefile
And the cairo.ml plugin: https://github.com/hhugo/OpaWhiteBoard/blob/master/src/opacairo/cairo.ml
The '##' directive are here in particularly to register functions and their types in OPA.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With