Servo's SpiderMonkey fork
C++ JavaScript Python C HTML WebAssembly Other
Clone or download
bors-servo Auto merge of #140 - servo:remove-libloading-patch, r=asajeffrey
Remove patch for libloading.

This prevents publishing the crate and is unnecessary.

<!-- Reviewable:start -->
This change is [<img src="" height="34" align="absmiddle" alt="Reviewable"/>](
<!-- Reviewable:end -->
Latest commit 7fb484a Jun 19, 2018

This repository contains Rust bindings for SpiderMonkey for use with Servo.

The bindings are to the raw SpiderMonkey API, higher-level bindings are in the rust-mozjs repository.


Under Linux:

Install Clang (at least version 3.9), for example in a Debian-based Linux:

sudo apt-get install clang-6.0

If you have more than one version of Clang installed, you can set the LIBCLANG_PATH environment variable, for example:

export LIBCLANG_PATH=/usr/lib/clang/4.0/lib

Under Windows:

  1. Follow the directions at

  2. Open up a shell configured to use Visual Studio. This could be the one included with Visual Studio (e.g. Visual Studio 2017 / X64 Native Tools Command Prompt for VS 2017) or a shell in which you have run

"c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
  1. Set the MOZTOOLS_PATH environment variable to point to the tools from the Mozilla Build Package:
set MOZTOOLS_PATH=C:\mozilla-build\msys\bin;C:\mozilla-build\mozmake;C:\mozilla-build\yasm
  1. Download and install Clang for Windows (64 bit) from and set the LIBCLANG_PATH environment variable to its lib directory:
set LIBCLANG_PATH=C:\Program Files\LLVM\lib

You can now build and test the crate using cargo:

cargo build
cargo test
cargo build --features debugmozjs
cargo test --features debugmozjs


In order to upgrade to a new version of SpiderMonkey:

  1. Download the tarball corresponding to the desired mozilla-central commit from treeherder's SM-tc(pkg) job.
  2. Update etc/COMMIT.
  3. Run python3 ./etc/ path/to/tarball.