-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Currently dart2wasm compiled apps are full apps that have a main function which can be invoked - there's no (official) capability to call out to imported wasm functions or export wasm functions to be consumed by other wasm modules.
This issue tracks (possibly in a dart:wasm):
- Export / Export functionality based on wasm types
- Defining & operating on rich set of wasm types (wasm primitives, user-defined wasm structs, etc)
- Only allow operating on the wasm types in a static way (i.e. they are not real objects, no dynamic dispatch, no tear-offs of functions using wasm types, etc - possibly with CFE/analyzer compile-time checks) and restrict user-defined Wasm structs, ...
WasmGC interop: For User-defined wasm structs the compiler would need to ensure that the types end up in the right recursion groups in order to ensure they will match with other wasm modules, ensuring interop works.
LinearWasm interop: We'd need to ensure the design is considering a future where multiple linear memories are supported (see https://github.com/WebAssembly/multi-memory).
We may want to expose this in a dart:wasm (possibly with same or separate dart:wasmgc)