Yew
WASM
assets size for ayew
application in Rust 🦀Few weeks ago I wrote rainbow, a color picker in plain old
HTML
/CSS
/JS
. I needed a color palette as quick as possible so I made this tool the quick-and-dirty way.I then gave this tool some thoughts, rewrote it in
Rust
🦀 and called it bifröst. It’s a single page application inWASM
and it’s loaded with many more features than rainbow.Let me tell you something : it’s HEAVY! The first iteration weighed
1.4Mo
. Way too much for such a small application.This blog post is about the settings and tools to divide its weigh by three.
Yew on Gitlab pages
My latest side-project requires a web front-end.
I’ve heard there are many frameworks in many languages for this. And to be honest, this is an understatement.
I first went for
Svelte
because a friend recommended this to me. I then had some issues with it an triedSolid
which was also a no-go in the end. Both areJavascript
framework and thenode_module
hell is actually a thing.I may have mentioned it before on this site but: I enjoy
Rust
🦀 quite a lot. So I searched for a solution on this side of the force and found out thatYew
has matured quite a lot since I first saw it.This is the technical solution I went with. And along the way, someone on Discord asked for a cheap way to host such an application. Here is my take at this question: can’t make cheaper than free thanks to
Gitlab
pages.