Skip to content

Releases: trunk-rs/trunk

Fix a regression in resolving WASM artifacts

30 Aug 16:21
Compare
Choose a tag to compare

0.3.1

fixed

  • Fixed a regression in resolving cargo build's output WASM.

Suppport for multi-project & workspace contexts

30 Aug 05:56
1c8e363
Compare
Choose a tag to compare

0.3.0

added

  • Handle multi-project & workspace contexts.

CLI progress spinner, --open to control browser opening, and other QOL improvements

30 Aug 02:20
Compare
Choose a tag to compare

0.2.0

changed

  • All CLI output has been improved using console & indicatif. Builds, asset pipelines, and the like are using a progress spinner along with messages. All in all this provides a much more clean CLI output experience.
  • Using console::Emoji to ensure that emojis are only sent to stdout/stderr when supported.
  • All builds performed by trunk now emit warnings when a link is found in the HTML which is an invalid FS path. This does not effect hyperlinks of course.
  • trunk serve now takes the --open option to control whether or not a browser tab will be opened. Thanks @MartinKavik for the report.
  • The trunk serve listener info has been slightly updated. It continues to function as in previous releases. Thanks @MartinKavik for the report.

Process crate names correctly & default to `index.html`

27 Aug 18:28
Compare
Choose a tag to compare

0.1.3

fixed

  • Closed #15: ensure cargo package name is processed as cargo itself processes package names (s/-/_/).
  • Closed #16: default to index.html as the default target for all CLI commands which expect a target. This matches the expectation of Seed & Yew.

Thanks @MartinKavik for reporting these items.

Swap out sass/scss engine for sass-rs

27 Aug 17:03
85462cf
Compare
Choose a tag to compare

0.1.2

changed

  • Swap our grass for sass-rs.
  • Compress SASS/SCSS output when building in --release mode.

Build, bundle & ship your Rust WASM application to the web.

26 Aug 03:39
Compare
Choose a tag to compare

I am happy to announce the very first release of Trunk. Trunk is a CLI tool, written in Rust, which provides a simple, zero-config pattern for building Rust WebAssembly applications, bundling application assets (sass, css, images &c) and shipping it all to the web.

Trunk is designed for creating progressive, single-page web applications, written in Rust, compiled to WebAssembly, without any JS (though today JS is still needed for loading WASM modules). Trunk follows a simple paradigm: declare an index.html file describing the single page of your application, then Trunk will parallelize bundling assets declared in your HTML, will build your WASM app, hash resources for cache control ... all without any extra config files.

Getting Started

Getting up and running with Trunk couldn't be easier. Head on over to the Getting Started section of the README for more details.

Features

Trunk ships with a built-in sass/scss compiler, a web server for serving your content during development, responds to file system changes while you work to trigger builds, and has other features already available and many others in the works. Check out the readme for more details.

Future

Trunk was born out of necessity. Personally, I have been SO eager to be able to build web applications entirely in Rust. The stability of Rust language overall, the ability to refactor and move quickly, the ability to scale out a code base with confidence ... a night and day difference from building non-trivial JS/TS web applications. I realized many times over that last few years that this is exactly the sort of tool we needed in the Rust WASM community to really help with ease and speed of development, and the lack of a tool like this was a major roadblock for me multiple times. I sincerely hope that Trunk will help us all forward on this path.

After some discussion with folks in the community, I would love to be able to leverage wasm-pack in the Trunk build pipeline. At a minimum for managing wasm-bindgen versions/installation, but perhaps to a further extent as well (see #5).

There are lots of other features in the works. SSE from the server to trigger reloads. WASM HMR (faster than reloads, but probably a bigger effort). Support for more asset types, minification, etc, etc. Lots to do.

Though this project is just a baby, it is usable right now, and I am currently using it for a personal project. I hope you find the time to use it, and if you do, please take the time to report your findings. What worked for you? What are some things which you still need? Any and all feedback is appreciated. Let's do this!

”Pack your things, we’re going on an adventure!” ~ Ferris