diff options
| author | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2022-12-04 13:16:54 -0800 |
|---|---|---|
| committer | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2022-12-04 13:16:54 -0800 |
| commit | c48d8cd151e019db787e5a67b6e63d47ae73af04 (patch) | |
| tree | 1f4ca7fe4195d4897033f2edb1aa671613ef083d /example/index.html | |
| parent | 437f1772f173abfa690072d9d4f9e8fbd3625996 (diff) | |
hook up logging to wasm, example uses new zig-js package
Diffstat (limited to 'example/index.html')
| -rw-r--r-- | example/index.html | 45 |
1 files changed, 10 insertions, 35 deletions
diff --git a/example/index.html b/example/index.html index 24acd9527..0866d6256 100644 --- a/example/index.html +++ b/example/index.html @@ -1,36 +1,11 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <title>WASM Example</title> - </head> - <body> - <script> - const importObject = { - module: {}, - env: { - // memory: new WebAssembly.Memory({ initial: 256 }), - } - }; - - fetch('ghostty-wasm.wasm').then(response => - response.arrayBuffer() - ).then(bytes => - WebAssembly.instantiate(bytes, importObject) - ).then(results => { - const { - atlas_new, - atlas_free, - atlas_reserve, - free, - memory, - } = results.instance.exports; - - const atlas = atlas_new(512, 0); - const reg = atlas_reserve(atlas, 10, 10); - free(reg); - atlas_free(atlas); - }); - </script> - </body> +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"/> + <title>Ghostty Example</title> + <script type="module" src="app.ts"></script> + </head> + <body> + Open your console, we are just debugging here. + </body> </html> |
