diff --git a/README.md b/README.md index 4901096..fa2659c 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,22 @@ These packages provide utilities for loading and running WASM modules. -* [wasm](https://github.com/dart-lang/wasm/blob/main/wasm/README.md): Runs WASM modules in Dart native. -* [flutter_wasm](https://github.com/dart-lang/wasm/blob/main/flutter_wasm/README.md): Runs WASM modules in Flutter. +## Status: Discontinued -## Status: Experimental +**Notice**: This package was an experiment in consuming WASM code - integrating +a WASM runtime into applications, allowing them to leverage existing native +libraries compiled to WASM. While this is still an interesting path to explore, +generally as a team we're investing in producing WASM from Dart - letting a Dart +based app run in a WASM runtime (ala Flutter Web in a browser). See +https://docs.flutter.dev/platform-integration/web/wasm for more information. -**NOTE**: This package is currently experimental and published under the -[labs.dart.dev](https://dart.dev/dart-team-packages) pub publisher in order to -solicit feedback. +For people who do wish to continue to experiment with a similar technique to +package:wasm / leveraging a wasm runtime, please feel free to fork this repo. -For packages in the labs.dart.dev publisher we generally plan to either graduate -the package into a supported publisher (dart.dev, tools.dart.dev) after a period -of feedback and iteration, or discontinue the package. These packages have a -much higher expected rate of API and breaking changes. +See also https://github.com/dart-lang/wasm/issues/146. -Your feedback is valuable and will help us evolve this package. For general -feedback, suggestions, and comments, please file an issue in the -[bug tracker](https://github.com/dart-lang/wasm/issues). +## Packages + +| Package | Description | Published Version | +| --- | --- | --- | +| [wasm](wasm/) | Runs WASM modules in Dart native. | [![pub package](https://img.shields.io/pub/v/wasm.svg)](https://pub.dev/packages/wasm) | +| [flutter_wasm](flutter_wasm/) | Runs WASM modules in Flutter. | | diff --git a/flutter_wasm/analysis_options.yaml b/flutter_wasm/analysis_options.yaml new file mode 100644 index 0000000..d6966f1 --- /dev/null +++ b/flutter_wasm/analysis_options.yaml @@ -0,0 +1,11 @@ +include: package:flutter_lints/flutter.yaml + +analyzer: + language: + strict-casts: true + strict-inference: true + strict-raw-types: true + +linter: + rules: + prefer_single_quotes: true diff --git a/flutter_wasm/bin/setup.dart b/flutter_wasm/bin/setup.dart index 475b0ee..3b71c25 100644 --- a/flutter_wasm/bin/setup.dart +++ b/flutter_wasm/bin/setup.dart @@ -20,6 +20,7 @@ final _workingDirectory = Isolate.resolvePackageUri( ).then((value) => value!.resolve('..').toFilePath()); Future _runFlutter(List args) async { + // ignore: avoid_print print('flutter ${args.join(' ')}'); final process = await Process.start( diff --git a/flutter_wasm/pubspec.yaml b/flutter_wasm/pubspec.yaml index 4136cad..8cbf4be 100644 --- a/flutter_wasm/pubspec.yaml +++ b/flutter_wasm/pubspec.yaml @@ -16,9 +16,9 @@ dependencies: path: wasm dev_dependencies: + flutter_lints: ^2.0.0 flutter_test: sdk: flutter - lints: ^2.0.0 dependency_overrides: wasm: diff --git a/wasm/CHANGELOG.md b/wasm/CHANGELOG.md index 5aa9967..6cf8134 100644 --- a/wasm/CHANGELOG.md +++ b/wasm/CHANGELOG.md @@ -1,5 +1,7 @@ ## 0.2.0-dev +- Updated the readme to reflect the fact that the package has been discontinued; + see also https://github.com/dart-lang/wasm/issues/146. - Require Dart 2.18 - Provide a new way for creating a WasmModule via `wasmModuleCompileAsync` and `wasmModuleCompileSync` diff --git a/wasm/README.md b/wasm/README.md index ec3f320..35a2d8c 100644 --- a/wasm/README.md +++ b/wasm/README.md @@ -2,11 +2,22 @@ [![Build Status](https://github.com/dart-lang/wasm/workflows/CI/badge.svg)](https://github.com/dart-lang/wasm/actions?query=workflow%3ACI+branch%3Amain) [![Coverage Status](https://coveralls.io/repos/github/dart-lang/wasm/badge.svg?branch=main)](https://coveralls.io/github/dart-lang/wasm?branch=main) -Provides utilities for loading and running WASM modules. +Provides utilities for loading and running WASM modules. Built on top of the +[Wasmer](https://github.com/wasmerio/wasmer) runtime. -Built on top of the [Wasmer](https://github.com/wasmerio/wasmer) runtime. +## Status: Discontinued -Flutter and web are **not supported** at the moment. Stay tuned though ;) +**Notice**: This package was an experiment in consuming WASM code - integrating +a WASM runtime into applications, allowing them to leverage existing native +libraries compiled to WASM. While this is still an interesting path to explore, +generally as a team we're investing in producing WASM from Dart - letting a Dart +based app run in a WASM runtime (ala Flutter Web in a browser). See +https://docs.flutter.dev/platform-integration/web/wasm for more information. + +For people who do wish to continue to experiment with a similar technique to +package:wasm / leveraging a wasm runtime, please feel free to fork this repo. + +See also https://github.com/dart-lang/wasm/issues/146. ## Setup diff --git a/analysis_options.yaml b/wasm/analysis_options.yaml similarity index 100% rename from analysis_options.yaml rename to wasm/analysis_options.yaml diff --git a/wasm/bin/setup.dart b/wasm/bin/setup.dart index 2b93c9b..9c0b3db 100644 --- a/wasm/bin/setup.dart +++ b/wasm/bin/setup.dart @@ -279,7 +279,7 @@ Future _main(ArgResults args) async { outDir.toFilePath(), '--manifest-path', srcDir.resolve('Cargo.toml').toFilePath(), - '--release' + '--release', ], output: outWasmer, environment: { @@ -320,7 +320,7 @@ Future _main(ArgResults args) async { '-c', sdkIncDir.resolve('dart_api_dl.c').toFilePath(), '-o', - outDartApi.toFilePath() + outDartApi.toFilePath(), ], output: outDartApi, ); @@ -343,7 +343,7 @@ Future _main(ArgResults args) async { '-c', srcDir.resolve('finalizers.c').toFilePath(), '-o', - outFinalizers.toFilePath() + outFinalizers.toFilePath(), ], output: outFinalizers, ); @@ -372,7 +372,7 @@ Future _main(ArgResults args) async { outFinalizers.toFilePath(), outWasmer.toFilePath(), '-o', - outLib.toFilePath() + outLib.toFilePath(), ], output: outLib, );