Skip to content

Commit

Permalink
Add a short instruction about compiling the text in comments into binary
Browse files Browse the repository at this point in the history
  • Loading branch information
JSMonk authored Jul 2, 2024
1 parent 978c9ef commit 6a65b7d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions shared/src/webMain/resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@

/*
Represents the next Wasm module:
```wat
(module
(type $type0 (struct (field $field0 i8))) ;; check [Garbage Collector](https://github.com/WebAssembly/gc/blob/main/proposals/gc/Overview.md) support
(func $func0 ;; check [Exception Handling](https://github.com/WebAssembly/exception-handling/blob/main/proposals/exception-handling/Exceptions.md) support
Expand All @@ -163,6 +164,12 @@
drop
)
)
```
You can use [wasm-tools](https://github.com/bytecodealliance/wasm-tools) to compile the text above into a binary:
```sh
wasm-tools parse YOUR_WAT_WITH_THE_TEXT_ABOVE.wat > YOUR_WASM_WITH_THE_COMPILED_TEXT_ABOVE.wasm
```
*/
const simpleWasmModule = new Uint8Array([
0, 97, 115, 109, 1, 0, 0, 0, 1, 8, 2, 95,
Expand Down

0 comments on commit 6a65b7d

Please sign in to comment.