The VM built string views from a hand-written { *u8, u64 } descriptor,
which on wasm32 (size_t lengths) read every string as empty. Views now go
through std's BytesFromPointer, which uses the target's slice layout.
The object records and LuaSyntaxNode are private again, now that the
toolchain (locked to 88b505bf) handles Vecs of module-private records.
`make wasm` builds the VM for the web platform with Emscripten and runs
it in a private headless Chromium as part of `make test`.
18 lines
641 B
HTML
18 lines
641 B
HTML
<!doctype html>
|
|
<meta charset="utf-8">
|
|
<title>lua wasm32 test</title>
|
|
<pre id="lua-output"></pre>
|
|
<script>
|
|
// Emscripten writes stdout and stderr with console.log and console.error
|
|
// (bound when its script loads), and declares globals such as `out`, so
|
|
// this page captures the console under names of its own.
|
|
(function () {
|
|
var element = document.getElementById("lua-output");
|
|
function append(text) { element.textContent += text + "\n"; }
|
|
console.log = append;
|
|
console.error = append;
|
|
window.addEventListener("error", function (event) { append("ERROR " + event.message); });
|
|
})();
|
|
</script>
|
|
<script src="wasm_test.js"></script>
|