6 releases (3 breaking)
|0.4.1||Aug 26, 2023|
|0.4.0||Jan 16, 2023|
|0.3.0||Aug 5, 2020|
|0.2.1||Jul 8, 2020|
|0.1.0||Sep 21, 2019|
#440 in Web programming
139 downloads per month
Used in notmykdb
- Custom user data can be bound to a
MiniV8::set_user_data). This is useful for storing state between embedded Rust function calls.
HashSet, etc.). You can define a conversion interface for your own types, too. See
src/conversion.rsfor more information.
- Execution timeout support.
MiniV8 is inspired by the MiniRacer Ruby gem, which implements a minimal bridge with V8. From its README: "This [minimal design] reduces the surface area making upgrading [V8] much simpler and exhaustive testing simpler." Contrast this with the ambitious v8-rs crate, which remains unmaintained because "the maintenance burden is too high."
When utilizing any FFI, it's significantly easier to select a subset of the entire source library than to attempt to map one-to-one all of its constructs. This of course means sacrificing features and perhaps performance, but allows for flexibility during API design leading to more idiomatic code in the target language.
- MiniV8 only implements a minimal bridge for the full set of types that modern ECMAScript offers. Perhaps the current
Valuebridge should be expanded to support a few more special object types (
- Once an
Erroris converted into a
Error(we already do this sort of trick to bind Rust closures to V8 functions).
- No support for limiting memory usage.