Files
sdk/pkg/dart2wasm/bin/dart2wasm.dart
Michael Thomsen 0df58fc2d0 Add new dart compile wasm command.
Marked as experimental, and only shown when verbose flag is passed:

```
$ dart help compile -v
Compile Dart to various formats.

Usage: dart [vm-options] compile <subcommand> [arguments]
-h, --help    Print this usage information.

Available subcommands:
  aot-snapshot   Compile Dart to an AOT snapshot.
  exe            Compile Dart to a self-contained executable.
  jit-snapshot   Compile Dart to a JIT snapshot.
  js             Compile Dart to JavaScript.
  kernel         Compile Dart to a kernel snapshot.
  wasm           Compile Dart to a WebAssembly/WasmGC module (EXPERIMENTAL).
```

Change-Id: I6a0e65d4fbdd7b2782406b8b9969e14036bf0711
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304860
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2023-12-05 15:44:53 +00:00

12 lines
381 B
Dart

// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:io';
import 'package:dart2wasm/dart2wasm.dart' as dart2wasm;
Future<void> main(List<String> args) async {
exitCode = await dart2wasm.main(args);
}