Repository navigation
docs: fix gc tutorial compile and run commands - #317
Open
Elvand-Lie wants to merge 1 commit into
Open
Elvand-Lie wants to merge 1 commit into
Elvand-Lie wants to merge 1 commit into
Conversation
Use wasm-tools for GC WAT and the documented reactor invocation syntax. Assisted-by: Codex (OpenAI) Assisted-by: Claude (Anthropic) Signed-off-by: Elvand Lie Nababan <elvandlie@gmail.com>
Elvand-Lie
marked this pull request as ready for review
October 24, 2026 16:51
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Readers cannot finish either GC example: WABT rejects the GC WAT, and WasmEdge 0.18.1 rejects
--invoke. Use wasm-tools to compile the unchanged WAT, then use the documented reactor invocation convention to obtain the existing expected outputs, 99 and 42.Related issue
Closes #316
Related: #235 (GC documentation request).
What type of PR is this
/kind documentation
Proposed Changes
wasm-tools parse.--reactorin both run commands.gc.mdexists underi18n/.wat2wasm point.wat -o point.wasmstruct not allowedwasm-tools parse point.wat -o point.wasmwasmedge --invoke make_point point.wasmunknown option: invokewasmedge --reactor point.wasm make_point99wat2wasm array.wat -o array.wasmarray type not allowedwasm-tools parse array.wat -o array.wasmwasmedge --invoke array_example array.wasmunknown option: invokewasmedge --reactor array.wasm array_example42Validation
Extracted the WAT and shell commands directly from the edited page and ran all eight Linux commands in order in a fresh
ubuntu:24.04container. WasmEdge 0.18.1 came from the official installer; wasm-tools 1.262.0 came from the documented release tarball. Both compile commands exited 0 and the run commands printed the documented results:The unchanged disable-GC example was run verbatim with
your_module.wasmholding a copy ofpoint.wasm; it rejected the GC module as expected. Homebrew's formula API confirms an enabled, non-deprecatedwasm-toolsformula; the macOS command was not executed on Ubuntu.The repository's
npm run lint:cipassed under Node 16.14.0, but its ESLint and Stylelint file patterns do not cover Markdown.Assisted by Claude Opus 5.5 and GPT 6.1 sol, reviewed by the author.