binaryen.ml icon indicating copy to clipboard operation
binaryen.ml copied to clipboard

Add GC APIs

Open phated opened this issue 2 years ago • 2 comments

Binaryen 111 added C APIs for most GC-related functions, such as: https://github.com/WebAssembly/binaryen/compare/version_110...version_111#diff-5d2db7a99567fbac5e617fd39709fbdca0a2d22b92a97d5c3515caf7dba9f78bR1035-R1154 and https://github.com/WebAssembly/binaryen/compare/version_110...version_111#diff-5d2db7a99567fbac5e617fd39709fbdca0a2d22b92a97d5c3515caf7dba9f78bR2335-R2706

However, they left them all as TODO in the JS code (see https://github.com/WebAssembly/binaryen/compare/version_110...version_111#diff-9f4ceff4b9bcc272e133f83651e487c15f772e6115c88023c2435cc5226d8b68R2438-R2448)

We generally don't want to bind to things that can't be bound in JS, so we should check to see if these APIs were added in v112 and implement them when available.

It also seems like we need to implement an API for the "type builder" API in binaryen.

phated avatar Mar 23 '23 14:03 phated

The gc-related instructions are still marked as todo in version_112 from what I can tell https://github.com/WebAssembly/binaryen/blob/728b37cbe95ca8ea8cfba9ebc70e3fcb14db273a/src/js/binaryen.js-post.js#L2430-L2440

spotandjake avatar Mar 23 '23 15:03 spotandjake

Tracker issue for adding bindings to Binaryen.js: https://github.com/WebAssembly/binaryen/issues/5921

peblair avatar Oct 15 '23 08:10 peblair