Re:Rust Foundation: Hello, World
by brabel on Monday February 08, 2021 @02:19PM
(#26068845)
I've used Rust to write a couple of personal projects: a compiler for a language I've designed (it's really good for that because of its great ADT and pattern matching support) and a small CLI which I wanted to be very fast. Rust is great for that. The `structopt`[0] crate makes writing CLIs almost as easy as on a high level language.
The other project is a web app and I use Rust to compile to WASM. Because I had to use several web APIs (DOM, WebCrypto) I used the JS interop heavily, and that's still very painful to use if you use the low-level interop (js-sys and web-sys)... however, I am aware of several efforts in this area, like Yew[1], which should make things better.
The language is very hard to learn, but once you get past a certain threshold (depending on what you know already, that may take weeks to several months) it's really nice to use (though certain things are still hard to write because managing lifetimes can be very tricky).
The other project is a web app and I use Rust to compile to WASM. Because I had to use several web APIs (DOM, WebCrypto) I used the JS interop heavily, and that's still very painful to use if you use the low-level interop (js-sys and web-sys)... however, I am aware of several efforts in this area, like Yew[1], which should make things better.
The language is very hard to learn, but once you get past a certain threshold (depending on what you know already, that may take weeks to several months) it's really nice to use (though certain things are still hard to write because managing lifetimes can be very tricky).
[0] https://crates.io/crates/structopt
[1] https://yew.rs/