mirror of
https://github.com/leanprover/lean4.git
synced 2026-03-17 18:34:06 +00:00
doc(doc/make/emscripten): document Emscripten build
This commit is contained in:
13
doc/make/emscripten.md
Normal file
13
doc/make/emscripten.md
Normal file
@@ -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.
|
||||
@@ -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
|
||||
--------------------------
|
||||
|
||||
Reference in New Issue
Block a user