from Hacker News

Trunk – Build, bundle and ship your rust WASM application to the web

by maydemir on 5/22/22, 12:00 AM with 12 comments

  • by IshKebab on 5/22/22, 8:07 AM

    Trunk is great - waaay easier to get started with than the JS/NPM equivalents. Unfortunately it's also quite incomplete. I've only just started but already run into the fact that there's no support for CSS bundling. You basically have to list all of your CSS files manually in your HTML templates, or write your own bundler script.

    Still, it's pretty awesome.

  • by the_duke on 5/22/22, 9:12 AM

    Fair warning: trunk automatically downloads additional tools at runtime. It doesn't even prefer already installed local versions, and doesn't provide a way to disable downloading. It will even download older tool versions than the currently installed one, because the exact version is pinned code.

    This was enough for me to not use it.

  • by jka on 5/22/22, 8:51 AM

    Naive question: what's the advantage of this compared to using 'npm init wasm-app'[1], importing your Rust WASM module from JavaScript, and iterating from there?

    [1] - https://rustwasm.github.io/docs/book/game-of-life/hello-worl...

  • by cagenut on 5/22/22, 4:13 AM

    I'm completely new to the rust ecosystem, but am I reading this right, this is basically a dev webserver for running in your checkout and testing locally?

    Is this a competitor to an incumbent as I cant imagine something like that doesnt already exist?