1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! ocaml-rs is a library for directly interacting with the C OCaml runtime, in Rust.
//!
//! **Note:** `ocaml-rs` is still experimental, please report any issues on [github](https://github.com/zshipko/ocaml-rs/issues)
//!
//! This crate will allow you to write OCaml C stubs directly in Rust. It is suggested to build
//! a static library to link to when compiling your OCaml code.
//!
//! The following in Rust:
//!
//! ```norun
//! caml!(ml_add_10, |arg|, <result>, {
//! let n = arg.i32_val();
//! result = Value::i32(n + 10)
//! } -> result);
//! ```
//!
//! is equivalent to:
//!
//! ```c
//! value ml_add_10(value arg) {
//! CAMLparam1(arg);
//! CAMLlocal(result);
//! int n = int_val(arg);
//! result = val_int(arg + 10)
//! CAMLreturn(result);
//! }
//! ```
//!
//! using the traditional C bindings.
//!
//! For a more complete example see:
//! [https://github.com/zshipko/ocaml-vec](https://github.com/zshipko/ocaml-vec)
pub use Error;
pub use named_value;
pub use *;
pub use Tag;
pub use ;
pub use ;