Crate ocaml [−] [src]
ocaml-rs is a library for directly interacting with the C OCaml runtime, in Rust.
Consquently, ocaml is designed for rust shared objects that expose raw C FFI bindings,
which are then either statically or dynamically linked against an OCaml binary, which calls into these raw FFI bindings as if they were
regular, so-called "C stubs". Similarly, any OCaml runtime functions, such as caml_string_length
, will get their definition from the
final OCaml binary, with its associated runtime.
Reexports
pub use value::ToValue; |
pub use value::FromValue; |
pub use value::Value; |
Modules
conv | |
core | |
value |
Macros
array |
Create an OCaml array |
bp_val |
Pointer to the first byte |
caml |
Defines an external Rust function for FFI use by an OCaml program, with automatic |
caml_body |
Defines an OCaml FFI body, including any locals, as well as a return if provided; it is up to you to define the parameters. |
caml_ffi | |
caml_local |
Initializes and registers the given identifier(s) as a local value with the OCaml runtime. |
caml_param |
Registers OCaml parameters with the GC |
extract_exception | |
field |
Extracts from the |
int_val |
Converts an OCaml |
is_exception_result | |
list |
Create an OCaml list |
long_val |
|
make_exception_result | |
return0 |
Returns an OCaml |
store_field |
Stores the |
string_val |
Extracts a machine |
tag_val | |
tuple |
Create an OCaml tuple |
val_int |
Converts a machine |
val_long |
|
Structs
Array |
OCaml Array type |
List |
OCaml list type |
Str |
OCaml String type |
Tuple |
OCaml Tuple type |
Enums
Error |
Error returned by |
Tag |
Tags are used to determine the type of value that is stored in an OCaml value |
Functions
named_value |
Returns a named value registered by OCaml |