Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify wasm compile steps a bit #5810

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/content/web/wasm.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@ by following the temporary steps outlined here:
which is necessary to run Wasm.
Make sure your web apps are [migrated][] from `dart:html` to `package:web`.

1. Compile with Wasm: `mywebapp$ dart compile wasm web/main.dart`

1. Create a new directory for the built web app: `mkdir site`

1. Copy over Dart code: `cp web/main.* site/`
1. Compile with Wasm to a new `site` output directory: `mywebapp$ dart compile wasm web/main.dart -o site/main.wasm`

1. Copy over the web files: `cp web/index.html web/styles.css site/`

Expand All @@ -89,4 +85,4 @@ You can also try out this small example [here](https://github.com/mit-mit/sandbo
[`package:web`]: {{site.pub-pkg}}/web
[`dart:js_interop`]: {{site.dart.api}}/{{site.dart.sdk.channel}}/dart-js_interop
[migrated]: /interop/js-interop/package-web/
[dhttpd]: {{site.pub-pkg}}/dhttpd
[dhttpd]: {{site.pub-pkg}}/dhttpd