3 ms·
While I love Rust, I don't think this here is a good use case for it - TypeScript nowadays works really well with JSX and can be introduced incrementally. Rust
by Tade0 7y ago
While I love Rust, I don't think this here is a good use case for it - TypeScript nowadays works really well with JSX and can be introduced incrementally.
Rust's guarantees work best in a highly concurrent setting - a web app isn't really one.
Rust shines not on the application level, but on the framework/library level, where things like memory usage and performance are critical.
A framework with virtual DOM written entirely in Rust would go a long way. Same with a template compiler.
- gedy 7y agoWhile really cool, this is my big concern about web assembly (in a 'real company' doing boring stuff) - devs using in browser for UI/app stuff and fragmenting simple use cases across their favorite languages. Love your idea of frameworks leveraging for core parts like vdom though.
- maxyme 7y agoI've ported a template compiler to Rust before. The reality is you still end up with something slower than native JS because of the overhead serializing and parsing the JSON in WASM memory. This is something that will be helped by the interface types proposal[0] if it is implemented but I was surprised that this use case didn't work as well as I thought it would. [0] https://github.com/WebAssembly/interface-types/blob/master/proposals/interface-types/Explainer.md https://github.com/WebAssembly/interface-types/blob/master/p...
- shpongled 7y agoI use Rust all the time, where 90% of what I write is on the application level, and 5% is concurrent. I just like the language.
- eggsmediumrare 7y agoEnjoying the language you're using is as important as pretty much anything else.
- batmansmk 7y agoBoth virtual dom and template compilers exist in Rust: Yew for instance uses both to provide a React-like experience: https://github.com/yewstack/yew https://github.com/yewstack/yew JSX is easy to implement in Rust due to the fact that macros are first class citizen in Rust.
- perceptronas 7y agoI would say that a well designed application is exactly that: multiple libraries working together