Trunk: Build, bundle and ship your Rust WASM application to the web

by 0xedbon 7/23/24, 2:15 PMwith 19 comments
by SeanAndersonon 7/23/24, 2:56 PM

I've used Trunk for about a year on an app I'm slowly building and it's worked well. I would vouch for it.

It's a little light on maintainers. They shipped one version that was broken for my use case and it took maybe a week or two for things to get corrected, but was an innocent enough mistake and they were responsive on Discord. Other than that, no issues, works exactly like you'd expect.

by ActionHankon 7/23/24, 6:27 PM

I wish wasm related projects gave stats or benchmarks on payload size as that has always been an issue for me adopting and I usually only find out after building something small to test.

by jiyinyiyongon 7/24/24, 5:21 AM

I've used Trunk in my personal project for years. Very glad we have a handy tool to match the experience we develop with JavaScript. Now there are more and more front-end web devtools rewritted from Node.js to Rust for performance, Trunk is already in Rust since created.

by 01HNNWZ0MV43FFon 7/23/24, 11:50 PM

I'd use this to write frontend stuff in rust? I'm a little behind the times on web stuff but I was just thinking I have a simple web app with long polling I need to write, and even though it's total overkill I'd rather do it in rust than TS

by isosphereon 7/23/24, 6:52 PM

I've been using trunk for about a year and it hasn't gotten in my way at all. I used wasm-pack before but I prefer the trunk workflow. I was surprised how easy it was to add an external crate as a web worker.

by eamagon 7/23/24, 3:30 PM

Are there any examples?

by chaosprinton 7/23/24, 7:07 PM

is there any doc for header support? I noticed it when using egui but without cors this cannot be used for my project...

https://github.com/trunk-rs/trunk/pull/322

https://github.com/trunk-rs/trunk/issues/414

by JoosToopiton 7/24/24, 1:37 PM

This is pure cancer for the web we know.

by gewenyu99on 7/23/24, 4:05 PM

Us, from Trunk.io: "Oh look we're at the top of Hackernews! Oh wait it's not us"