Merge branch 'wasm' of github.com:GrammaticalFramework/gf-core into wasm

This commit is contained in:
Krasimir Angelov
2022-09-01 13:28:49 +02:00

View File

@@ -1,11 +1,11 @@
# JavaScript runtime using Web Assembly
This folder contains very early work experimenting with a pure JavaScript runtime,
copiled to Web Assembly (WASM) using [Emscripten](https://emscripten.org/).
compiled to Web Assembly (WASM) using [Emscripten](https://emscripten.org/).
1. Compile the WASM files (inside Docker) using `build-wasm.js`, placing them in `.libs/`
1. Compile the WASM files (inside Docker) using `build-wasm.sh`, placing them in `.libs/`
2. Test in Node.js by running `node test-node.js [path to PGF]`
3. Test in a web browser
a. Start a server with `npx serve -l 41296`
b. Browse to `http://localhost:41296/test-web.html`
c. Check JavaScript console
1. Start a server with `npx serve -l 41296`
2. Browse to `http://localhost:41296/test-web.html`
3. Check JavaScript console