Expand description
This crate contains Rust bindings to the SpiderMonkey Javascript engine developed by Mozilla.
These bindings are designed to be a fairly straightforward translation to the C++ API, while taking advantage of Rust’s memory safety. For more about the Spidermonkey API, see the embedding examples on GitHub.
The code from User Guide sections A minimal example and Running scripts are also included.
Modules§
- consts 🔒
- conversions
- Conversions of Rust values to and from
JSVal
. - error
- Functions to throw JavaScript exceptions from Rust.
- gc
- glue
- Rust wrappers for mozjs’s glue module
- jsapi
- jsid
- jsval
- panic
- rust
- Rust wrappers around the raw JS apis
- typedarray
- High-level, safe bindings for JS typed array APIs. Allows creating new typed arrays or wrapping existing JS reflectors, and prevents reinterpreting existing buffers as different types except in well-defined cases.
Macros§
- auto_
root - capture_
stack - new_
jsjitinfo_ bitfield_ 1 - Like
JSJitInfo::new_bitfield_1
, but usable inconst
contexts. - rooted
- rooted_
vec - typedarray
Constants§
- JSCLASS_
GLOBAL_ SLOT_ COUNT - JSCLASS_
HIGH_ FLAGS_ SHIFT - JSCLASS_
IS_ DOMJSCLASS - JSCLASS_
IS_ GLOBAL - JSCLASS_
IS_ PROXY - JSCLASS_
RESERVED_ SLOTS_ MASK - JSCLASS_
USERBI T1 - default_
heapsize