From 7e419326f7590890a71aadf6ad75d9bdbbad01c9 Mon Sep 17 00:00:00 2001 From: Wu Wayne Date: Wed, 14 Feb 2024 11:39:19 +0800 Subject: [PATCH] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index b6ab9f62990..a7667e9b1e0 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,14 @@ cargo build --features debugmozjs cargo test --features debugmozjs ``` +### Create and link prebuilt binary + +Spidermonkey is very large which could take a long time to compile. If you are looking for prebuilt version of mozjs, you +can ask someone to build it and share to you to link it. Mozjs currently offer two environment variables to enable such work: + +- `MOZJS_CREATE_MIRROR=1` can create a spidermonkey tarball for release usage. +- `MOZJS_MIRROR=absolute/path/to/libmozjs.tar.gz` can use this tarball to extract and link the static libraries without compiling spidermonkey and bindgen wrappers. + ### Usage for downstream consumers Mozjs is currently not published to crates.io, but it can be used from git (binaries should use lockfile instead of `rev`):