Develop wasm support further.

This commit is contained in:
Oleksandr Kozachuk
2023-01-06 16:16:04 +01:00
parent 3416ea96ae
commit e9dba54750
5 changed files with 49 additions and 16 deletions
+3 -2
View File
@@ -76,8 +76,6 @@
<body>
<div id="root"></div>
<script type="module">
import init, { ok_add } from "./pkg/helwasm.js";
function read_line(prompt) {
console.log("called read_line: " + prompt);
return "line";
@@ -88,9 +86,12 @@
return "password";
}
import init, { ok_add, hel_init, hel_command } from "./pkg/helwasm.js";
init().then(() => {
window.hel = {
ok_add: ok_add,
hel_init: hel_init,
hel_command: hel_command,
}
});
</script>