aboutsummaryrefslogtreecommitdiff
path: root/examples/wasm/index.html
diff options
context:
space:
mode:
authorUlf Lilleengen <[email protected]>2021-09-13 14:35:40 +0200
committerUlf Lilleengen <[email protected]>2021-09-13 16:42:39 +0200
commite24528051b9ed26157bee93e32e37e7b06b8f4cc (patch)
treebb0c4f201a6a7df9099d27b3a64f92036d645d45 /examples/wasm/index.html
parentf1c35b40c74db489da8e04f1c2e87a1d4030c617 (diff)
Add WASM support for executor
* Adds an executor for WASM runtimes based on wasm_bindgen. * Add time driver based on JS time handling. * Add example that can run in browser locally. * Update to critical-section version that supports 'std' flag
Diffstat (limited to 'examples/wasm/index.html')
-rw-r--r--examples/wasm/index.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/wasm/index.html b/examples/wasm/index.html
new file mode 100644
index 000000000..05e8b29f8
--- /dev/null
+++ b/examples/wasm/index.html
@@ -0,0 +1,25 @@
1<!DOCTYPE html>
2<html>
3 <head>
4 <meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>
5 </head>
6 <body>
7 <!-- Note the usage of `type=module` here as this is an ES6 module -->
8 <script type="module">
9 // Use ES module import syntax to import functionality from the module
10 // that we have compiled.
11 //
12 // Note that the `default` import is an initialization function which
13 // will "boot" the module and make it ready to use. Currently browsers
14 // don't support natively imported WebAssembly as an ES module, but
15 // eventually the manual initialization won't be required!
16 import init from './pkg/embassy_wasm_example.js';
17 await init();
18 </script>
19 <h1>Log</h1>
20 <div>
21 <ul id="log">
22 </ul>
23 </div>
24 </body>
25</html>