WebAssembly / WebAssembly/wabt
wat2wasm doesn't support wasm GC?
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.1k
- Forks
- 827
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 18
Description
code example:
;; wat2wasm --enable-gc ./test.wat
(module
(type $i32_arr (array (mut i32)) )
(func $createArray (param $len i32) (result i32)
(array.new
$i32_arr
(i32.const 42) ;; initial value
(local.get $len) ;; array len
)
(array.get
$i32_arr
(i32.const 0) ;; element idx
)
)
(export "createArray" (func $createArray) )
)
error msg:
./test.wat:6:10: error: unexpected token "array.new", expected an instr.
(array.new
wat2wasm doesn't support array instr?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided test.wat example with wat2wasm --enable-gc and trace how wat2wasm parses instructions. The payload names no source files or tests, so locate the parser and existing GC support before assessing the change. Done means the example accepts array.new and array.get without the reported unexpected-token error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, wasm
- Domain
- compilers, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100