|
17 | 17 | </div>
|
18 | 18 | <br/>
|
19 | 19 |
|
20 |
| -Goals: |
21 |
| -- Leverage the wasm-bindgen ecosystem for all things related to building Rust WASM for the web. |
22 |
| -- Simple, zero-config bundling of WASM, JS loader & other assets (images, css, scss) via a source HTML file. |
23 |
| -- Rust WASM first. Not the other way around. |
24 |
| - |
25 |
| -Inspiration primarily from [ParcelJS](https://parceljs.org). |
| 20 | +Trunk is a WASM web application bundler for Rust. Trunk uses a simple, zero-config pattern for building & bundling WASM, JS snippets & other assets (images, css, scss) via a source HTML file. |
26 | 21 |
|
27 | 22 | ## getting started
|
28 | 23 | ```bash
|
29 |
| -# Install trunk. |
| 24 | +# Install trunk via cargo. |
30 | 25 | cargo install trunk
|
31 | 26 |
|
| 27 | +# Alternatively, install a release binary (great for CI). |
| 28 | +wget -qO trunk.zip ${LINK_TO_RELEASE_BINARY} && \ |
| 29 | + unzip trunk.zip && \ |
| 30 | + chmod a+x trunk |
| 31 | + |
32 | 32 | # Install wasm-bindgen-cli.
|
33 |
| -cargo install wasm-bindgen-cli |
34 | 33 | # NOTE: in the future, trunk will do this for you.
|
| 34 | +cargo install wasm-bindgen-cli |
35 | 35 | ```
|
| 36 | +Release binaries can be found on the [Github releases page](https://github.com/thedodd/trunk/releases). |
36 | 37 |
|
37 | 38 | Get setup with your favorite `wasm-bindgen` based framework. [Yew](https://github.com/yewstack/yew) & [Seed](https://github.com/seed-rs/seed) are the most popular options today, but there are others. Trunk will work with any `wasm-bindgen` based framework. The easiest way to ensure that your application launches properly is to [setup your app as an executable](https://doc.rust-lang.org/cargo/guide/project-layout.html) with a standard `main` function:
|
38 | 39 |
|
@@ -83,6 +84,9 @@ Trunk leverages Rust's powerful concurrency primitives for maximum build speeds
|
83 | 84 | ### clean
|
84 | 85 | `trunk clean` cleans up any build artifacts generated from earlier builds.
|
85 | 86 |
|
| 87 | +### config show |
| 88 | +`trunk config show` prints out Trunk's current config, before factoring in CLI arguments. Nice for testing & debugging. |
| 89 | + |
86 | 90 | ## assets
|
87 | 91 | Trunk is still a young project, and new asset types will be added as we move forward. Keep an eye on [trunk#3](https://github.com/thedodd/trunk/issues/3) for more information on planned asset types, implementation status, and please contribute to the discussion if you think something is missing.
|
88 | 92 |
|
|
0 commit comments