Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wat2wasm doesn't support wasm GC? #2530

Open
chennbnbnb opened this issue Jan 14, 2025 · 1 comment
Open

wat2wasm doesn't support wasm GC? #2530

chennbnbnb opened this issue Jan 14, 2025 · 1 comment

Comments

@chennbnbnb
Copy link

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?

@sbc100
Copy link
Member

sbc100 commented Jan 14, 2025

Indeed wasm-gc is not supported by wabt. See #2363 and #2348

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

No branches or pull requests

2 participants