diff --git a/doc/make/emscripten.md b/doc/make/emscripten.md new file mode 100644 index 0000000000..8181b822a2 --- /dev/null +++ b/doc/make/emscripten.md @@ -0,0 +1,13 @@ +Compiling lean.js via Emscripten +-------------------------------- + +First install Emscripten via your distribution's package manager or [download and install it](https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html) yourself. Then build asm.js and WebAssembly binaries using + +```bash +mkdir -p build/emscripten +cd build/emscripten +emconfigure cmake ../../src -DCMAKE_BUILD_TYPE=Emscripten +make lean_js_js lean_js_wasm +``` + +This will produce files `lean_js_js.js`, `lean_js_wasm.js`, and `lean_js_wasm.wasm` in `shell/`, which you can e.g. copy to the `dist/` directory in [lean-web-editor](https://github.com/leanprover/lean-web-editor) instead of calling `./fetch_lean_js.sh` there. diff --git a/doc/make/index.md b/doc/make/index.md index 8c80cac7b6..4bb92d2be5 100644 --- a/doc/make/index.md +++ b/doc/make/index.md @@ -12,6 +12,7 @@ Platform-Specific Setup - [Windows (msys2)](msys2.md) - [Windows (Visual Studio)](msvc.md) - [macOS](osx-10.9.md) +- [Emscripten: lean.js](emscripten.md) Generic Build Instructions --------------------------