- Minor improvements #154
- Fortran bigarray layout by @crackcomm #145
- Fix conversion of
Vec<f32>
by @gridbugs #144
- Implement
ToValue
forBox<T>
by @fmckeogh #107 - Refactor derive macros for
FromValue
andToValue
- Drop support for OCaml 4.07
- Added
ocaml::function
macro for calling OCaml values - Fix spelling in book by @fmckeogh in #98
- Fixes no_std by @fmckeogh in #99
- Feature gate panic hook by @fmckeogh in #100
- Test
no_std
feature in CI by @fmckeogh in #101 - Implement
FromValue
forBox<T>
by @fmckeogh in #105
- Added
Seq
type
- Add
ToValue
/FromValue
implementations foru32
- Removed
IntoValue
and addedToValue
because it now accepts a reference to self Custom
types now have to be wrapped in aPointer<T>
- Added
ocaml::import!
macro for calling OCaml functions from Rust - Added
ocaml::sig
proc-macro for generatingexternal
and type signatures - Added ocaml-build crate for generating OCaml code from
ocaml::sig
macros and linking dune projects - Renamed
Value::call
toValue::call1
and rewroteValue::call
to take a variable number of arguments - Added support for automatic conversion between OCaml
Result.t
and RustResult
- Renamed
Value::float
toValue::double
andValue::float_val
toValue::double_val
- Added
Value::alloc_double_array
,Value::double_field
andValue::store_double_field
- Improved support for float arrays in ocaml-sys
Custom
values have a new defaultfinalize
implementation that will drop the inner Rust value
- Added
Value::exn_to_string
to convert OCaml exception values to their string representation - Added
gc_minor
,gc_major
,gc_full_major
andgc_compact
functions for interacting with the OCaml garbage collector
- Use latest
ocaml-interop
- Adds
FromValue
/ToValue
for[u8]
- Add
no-caml-startup
feature to allowocaml-rs
libraries to link correctly when usingdune utop
- Allow
Value
to hold boxroot or raw value - Add
Raw::as_value
andRaw::as_pointer
- New
Value
implementation to useocaml-boxroot-sys
Value
no longer implementsCopy
ocaml::Raw
was added to wrapocaml::sys::Value
in macros- Update
ocaml-interop
version
- Fix issue with OCaml runtime initialization: #59
Value
methods marked asunsafe
: theValue
API is considered the "unsafe" API andocaml-interop
is the safer choiceToValue
renamed toIntoValue
- All functions that cause OCaml allocations (including
IntoValue::into_value
) take a reference toocaml::Runtime
, which is provided by an implicit variable namedgc
when usingocaml-derive
(the name of this variable is configurable:#[ocaml::func(my_gc_var)]
)