flutter / flutter/flutter

[proposal][wasm][ffi] AOT wasm interoperability

Open
#160,735 10 comments 6 reactions 0 assignees View on GitHub
c: new feature c: proposal dependency: dart dependency:dart-triaged e: wasm P3 team-engine triaged-engine
Dominant language
Dart
Stars
179k
Forks
31.1k
PR merge metrics
PR metrics pending

Description

### Use case

wasm interoperability would offers great value to flutter's framework
I'm sure the team is aware of this [[1](https://github.com/dart-archive/wasm/issues/146#issuecomment-1578567050), [2](https://github.com/dart-archive/wasm/issues/146#issuecomment-1579495860)] given that there used to be a [labs.dart.dev](https://pub.dev/publishers/labs.dart.dev/packages)'s package [wasm](https://pub.dev/packages/wasm)
that was [discontinued](https://github.com/dart-archive/wasm/issues/146) in summer 2023;
according to this [comment](https://github.com/dart-archive/wasm/issues/146#issuecomment-1577707770) such decision was caused by 3 technical obstacles:
- lack of dart/flutter native assets feature
- lack of AOT mode of the wasm runtime of choice for ios
- need for a separated package for bindings

as of today there is visible momentum towards the clearing of the main obstacles

- dart has an [experimental native assets feature](https://github.com/dart-lang/native/tree/main/pkgs/native_assets_cli)
- https://github.com/dart-lang/sdk/issues/50565
- https://github.com/flutter/flutter/issues/129757
- [wasmedge](https://github.com/WasmEdge/WasmEdge) besides provide support for [several platforms](https://wasmedge.org/docs/category/supported-platforms) is working on wasm AOT fro android and ios
- https://github.com/WasmEdge/WasmEdge/issues/2621

### Proposal

Track the clearing of technical blocker for a `wasm` implementation
and if/when these blockers are cleared resume/re-work the deprecated [package:wasm](https://pub.dev/packages/wasm)

#

cc @devoncarew @mit-mit @liamappelbe @hydai

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.