ocaml-rs - OCaml extensions in Rust

ocaml-rs allows for OCaml extensions to be written directly in Rust with no C stubs. It was forked from raml with the goal of creating a safer, high-level interface.

```rust

[macro_use]

use ocaml; use ocaml::ToValue;

caml!(mlbeef, |parameter|, , { let i = parameter.valint(); let res = 0xbeef * i; println!("about to return 0x{:x} to OCaml runtime", res); local = res.to_value(); } -> local); ```

This will take care of all the OCaml garbage collector related bookkeeping (CAMLparam, CAMLlocal and CAMLreturn)

For a working example see ./examples/rust and ./examples/ocaml

Documentation

https://docs.rs/ocaml/