From 6a65b7d2113ae6cd1dbf1c20c4688d87b6eba421 Mon Sep 17 00:00:00 2001 From: Artem Kobzar Date: Tue, 2 Jul 2024 18:21:24 +0200 Subject: [PATCH] Add a short instruction about compiling the text in comments into binary --- shared/src/webMain/resources/index.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shared/src/webMain/resources/index.html b/shared/src/webMain/resources/index.html index 66718db5..18cde0d9 100644 --- a/shared/src/webMain/resources/index.html +++ b/shared/src/webMain/resources/index.html @@ -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 @@ -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,