Skip to content

docs: add Wasm GC proposal tutorial#306

Open
Ankitdotraider wants to merge 2 commits into
WasmEdge:mainfrom
Ankitdotraider:docs/wasm-gc-proposal
Open

docs: add Wasm GC proposal tutorial#306
Ankitdotraider wants to merge 2 commits into
WasmEdge:mainfrom
Ankitdotraider:docs/wasm-gc-proposal

Conversation

@Ankitdotraider

Copy link
Copy Markdown

Closes #235

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md tutorial 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
Comment thread docs/start/wasmedge/extensions/gc.md Outdated

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 thread docs/start/wasmedge/extensions/gc.md Outdated
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
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add a chapter about the Wasm GC proposal

2 participants