docs: add Wasm GC proposal tutorial#306
Open
Ankitdotraider wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new documentation tutorial page for the WebAssembly GC proposal in WasmEdge and links it from the existing proposals index, aligning with the request in issue #235.
Changes:
- Updates the proposals reference list to link “Garbage collection” to a local doc page.
- Adds a new
gc.mdtutorial covering GC basics, CLI usage, WAT examples, and C API configuration.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| docs/start/wasmedge/extensions/proposals.md | Switches the “Garbage collection” reference link from external to an internal doc link. |
| docs/start/wasmedge/extensions/gc.md | New tutorial page explaining Wasm GC support in WasmEdge with examples and configuration guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [Exception handling]: https://github.com/WebAssembly/exception-handling | ||
| [Typed Function References]: https://github.com/WebAssembly/function-references | ||
| [Garbage collection]: https://github.com/WebAssembly/gc | ||
| [Garbage collection]: ./gc |
|
|
||
| Normally, WebAssembly manages memory manually — programs allocate and free memory themselves using linear memory. The GC proposal adds first-class garbage-collected types: **structs** (fixed heterogeneous fields) and **arrays** (homogeneous elements), both allocated on the heap and automatically reclaimed when no longer reachable. | ||
|
|
||
| This is enabled by default in WasmEdge since `0.16.0`. You can disable it with the `--disable-gc` CLI flag if needed. |
Comment on lines
+125
to
+127
| // GC is enabled by default since 0.16.0. | ||
| // To disable it: | ||
| WasmEdge_ConfigureRemoveProposal(ConfCxt, WasmEdge_Proposal_GC); |
Comment on lines
+1
to
+3
| --- | ||
| sidebar_position: 2 | ||
| --- |
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.
Closes #235