3 ms·
I've been doing a lot of web development in Rust over the past few weeks. Same as the parent poster; I was using beta so that I could have serde/diesel :) I ch
by steveklabnik 10y ago
I've been doing a lot of web development in Rust over the past few weeks. Same as the parent poster; I was using beta so that I could have serde/diesel :)
I chose to go with straight-up tokio/hyper, rather than use existing frameworks. All of the current frameworks haven't integrated it yet, because it's only available on hyper master. (They're working on getting docs and such going before releasing the next version.) Here's my Cargo.toml: https://github.com/rust-lang-nursery/thanks/blob/master/Cargo.toml https://github.com/rust-lang-nursery/thanks/blob/master/Carg...
Overall, I feel that it's pretty great. It is still extremely new, though, so you have to be a bit comfortable with working on the bleeding edge. Also, because there's no big framework yet, it has a more... node-ish feel, in that you're doing a lot yourself and hooking up libraries, rather than using the conveniences of something like Rails. But that's not too bad; I wrote a little routing framework that also serves static content, it's about 150 lines. Another 12 or so to wrap up handlebars into something a bit nicer to use. And it uses so, so much less memory than my Rails apps do, and a six megabyte statically linked binary is a dream for deployment.
I was originally quite skeptical of all of this, but as the docs and libraries mature, I think it'll be pretty great. It won't be as easy as something like Rails, but it's much nicer than I originally assumed.