Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



I'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/p...


I 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.


Enjoying the language you're using is as important as pretty much anything else.


Both virtual dom and template compilers exist in Rust: Yew for instance uses both to provide a React-like experience: https://github.com/yewstack/yew JSX is easy to implement in Rust due to the fact that macros are first class citizen in Rust.


While 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.


I would say that a well designed application is exactly that: multiple libraries working together




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: