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

The wat2wasm tool already supports wasmGC, such as struct.new  #2363

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Guo-yyds
Copy link

@Guo-yyds Guo-yyds commented Jan 8, 2024

The wat2wasm tool already supports wasmGC, such as struct.new.

guohaonan

School of Software, Beihang University

@sbc100
Copy link
Member

sbc100 commented Jan 8, 2024

Hopefully this change should mean we can run some of the 'gc' test suite? See unimplemented in test/update-spec-tests.py

@Guo-yyds
Copy link
Author

Guo-yyds commented Jan 9, 2024

There are still a few issues that are being worked on, mainly on type checking regarding reference types. Because the two proposals are very different in their citations.

In addition, when submitting pr, I found an issue that has been raised about the coding of ref. In the gc proposal, the ref coding has changed, I hope to deal with it.

@jkrems
Copy link

jkrems commented May 10, 2024

Hey - really excited for this change (just ran into the lack of gc instructions in the wat conversion tool). Is this still actively being worked on? Anything I could help with, e.g. looking into the ref handling and/or failing builds..?

@AjaniBilby
Copy link

AjaniBilby commented Oct 12, 2024

I am confused by the first sentance of this PR, in wat2wasm v1.0.36 I get an error just trying to use struct.new.
Am I miss-understanding the wat syntax? Or is something else going on?

(module
  (type $TypeA (struct(field i32)))
  (func (export "main")
    (struct.new $TypeA (i32.const 42))
    (drop)
  )
)
>wat2wasm gc.wat -o gc.wasm --enable-all
gc.wat:6:4: error: unexpected token "struct.new", expected an instr.
                (struct.new $TypeA 42)
   ^^^^^^^^^^

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.

4 participants