-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Streamline tool setup, add headings to project setup * Address typos * resolve link * resolve link 2 * resolve link 3 * resolve link 4 * Update docs/getting-started/build-a-sample-app.md Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com> * Update docs/getting-started/build-a-sample-app.md Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com> * Update docs/getting-started/build-a-sample-app.md Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com> * Update docs/getting-started/build-a-sample-app.md Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com> * Update docs/getting-started/build-a-sample-app.md Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com> * Update docs/getting-started/project-setup.md Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com> * Update docs/getting-started/project-setup.md Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com> * Update docs/getting-started/project-setup.md Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com> * Update docs/getting-started/project-setup.md Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com> * Update docs/getting-started/project-setup.md Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com> * Add header info to wasm-build-tools.md, added wasm-build-tools to sidebar.json, updated build-a-sample-app.md * Apply suggestions from code review Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com> Co-authored-by: EC2 Default User <ec2-user@ip-172-31-51-38.ec2.internal> Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com> Co-authored-by: Simon <simon@siku2.io>
- Loading branch information
1 parent
c0b1ba4
commit c91d3dc
Showing
4 changed files
with
112 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: Wasm Build Tools | ||
description: Information about build tools | ||
--- | ||
|
||
|
||
## **Wasm Build Tools** | ||
|
||
Extra tooling is needed to facilitate the interop between WebAssembly and JavaScript. Additionally, | ||
depending on the tool you choose, they can help make deployment and packaging much less of a | ||
headache by generating all of the JavaScript code necessary to load and run your app's `.wasm` | ||
binary in a browser. | ||
|
||
### [**`trunk`**](https://github.com/thedodd/trunk/) | ||
|
||
A tool practically made for building Yew apps. | ||
It can build any `wasm-bindgen` based app and its design is inspired by rollup.js. | ||
With Trunk you don't need to have Node.js installed or touch any JavaScript code for that matter. | ||
It can bundle assets for your app and even ships with a Sass compiler. | ||
|
||
All of our examples are built with Trunk. | ||
|
||
[Getting started with `trunk`](project-setup/using-trunk.md) | ||
|
||
### [**`wasm-pack`**](https://rustwasm.github.io/docs/wasm-pack/) | ||
|
||
A CLI tool developed by the Rust / Wasm Working Group for packaging up WebAssembly. Best used | ||
together with the [`wasm-pack-plugin`](https://github.com/wasm-tool/wasm-pack-plugin) for Webpack. | ||
The primary purpose of `wasm-pack` is building Wasm libraries for use in JavaScript. | ||
Because of this, it can only build libraries and doesn't provide useful tools like a development server or automatic rebuilds. | ||
|
||
[Get started with `wasm-pack`](project-setup/using-wasm-pack.md) | ||
|
||
### Comparison | ||
|
||
| | `trunk` | `wasm-pack` | | ||
| ----------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | ||
| Project Status | Actively maintained | Actively maintained by the [Rust / Wasm Working Group](https://rustwasm.github.io) | | ||
| Dev Experience | Just works! Batteries included, no external dependencies needed. | Bare-bones. You'll need to write some scripts to streamline the experience or use the webpack plugin. | | ||
| Local Server | Supported | Only with webpack plugin | | ||
| Auto rebuild on local changes | Supported | Only with webpack plugin | | ||
| Asset handling | Supported | Only with webpack plugin | | ||
| Headless Browser Testing | [In Progress](https://github.com/thedodd/trunk/issues/20) | [Supported](https://rustwasm.github.io/wasm-pack/book/commands/test.html) | | ||
| Supported Targets | <ul><li><code>wasm32-unknown-unknown</code></li></ul> | <ul><li><code>wasm32-unknown-unknown</code></li></ul> | | ||
| Example Usage | [Sample app](./../getting-started/build-a-sample-app.md) | [Starter template](https://github.com/yewstack/yew-wasm-pack-minimal) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters