assemblyscript
assemblyscript copied to clipboard
Extern classes experiment
As a follow-up to today's meeting discussion about bindings, here's a little mad science binding AssemblyScript classes to externref objects.
The interesting parts are
loader.bindto make useful imports of an external classstd/assembly/bindings/DOMdeclaring the importstests/compiler/bindings/domconsuming the imports
This is far from perfect of course, like we are missing function overloading to describe multiple valid signatures, but here's where things become interesting.
Note that playing with the test requires ASC_FEATURES=* in the environment to enable all the things incl. reference-types.
cc @battlelinegames
- [x] I've read the contributing guidelines
Tests are failing because of a renaming conflict between the --experimental-wasm-reftypes and --experimental-wasm-anyref flags. Afaik current node uses the latter still, while canary switched to the former.