gecko-dev/js/rust
Emilio Cobos Álvarez 41ff579eac Bug 1583471 - Don't pull new syn / quote / etc. dependencies just yet. r=bbouvier
Transition to syn 1.0 is ongoing, but these take a long time to build.

Hopefully we already patch coreaudio-sys manually so all the crates dependent on
bindgen are effectively in-tree.

I published v0.51.1-oldsyn to avoid pulling all these dependencies for now.

Differential Revision: https://phabricator.services.mozilla.com/D46966

--HG--
rename : third_party/rust/quote-0.6.11/tests/conditional/integer128.rs => third_party/rust/quote/tests/conditional/integer128.rs
rename : third_party/rust/unicode-xid-0.1.0/scripts/unicode.py => third_party/rust/unicode-xid/scripts/unicode.py
extra : moz-landing-system : lando
2019-09-25 09:50:10 +00:00
..
etc Bug 1534967 - Part 2: Use RootedIdVector in rust binding. r=jonco,fitzgen 2019-04-08 10:46:58 +08:00
src Bug 1581574 - Remove Heap<T> write barrier and rely on existing read barrier to make incremental marking work r=sfink 2019-09-20 10:09:19 +00:00
tests Bug 1573844 - Remove js::Class definition and alias JSClass to it r=tcampbell,mccr8 2019-08-15 08:32:22 +00:00
.gitignore
build.rs Bug 1573844 - Remove references to js::Class and remove the alias r=tcampbell 2019-08-14 19:13:12 +00:00
Cargo.toml Bug 1583471 - Don't pull new syn / quote / etc. dependencies just yet. r=bbouvier 2019-09-25 09:50:10 +00:00
CMakeLists.txt
README.md

The js Crate: Rust Bindings to SpiderMonkey

User Documentation

Building

To build a release version of SpiderMonkey and the Rust code with optimizations enabled:

$ cargo build --release

To build with SpiderMonkey's DEBUG checks and assertions:

$ cargo build --features debugmozjs

Raw FFI bindings to JSAPI are machine generated with rust-lang-nursery/rust-bindgen, and requires libclang >= 3.9. See ./build.rs for details.

Cargo Features

  • debugmozjs: Create a DEBUG build of SpiderMonkey with many extra assertions enabled. This is decoupled from whether the crate and its Rust code is built in debug or release mode.

  • promises: Enable SpiderMonkey native promises.

  • nonzero: Leverage the unstable NonZero type. Requires nightly Rust.

Testing

Make sure to test both with and without the debugmozjs feature because various structures have different sizes and get passed through functions differently at the ABI level! At minimum, you should test with debugmozjs to get extra assertions and checking.

$ cargo test
$ cargo test --features debugmozjs