3 ms·
It's good to see new web-focused projects in Rust, I think it can be a really great language for this kind of thing. But to be honest, I'm looking forward to se
by killercup 10y ago
It's good to see new web-focused projects in Rust, I think it can be a really great language for this kind of thing. But to be honest, I'm looking forward to seeing what will be considered the go-to approach for Rust web applications _in a year_ or so.
There is much experimentation going on right now, with cool little innovations here and there, but I have yet to see an approach that looks really new and Rust-y to me.
For example: Rust's type system certainly has some nice properties to track dependencies between middlewares[^1] but I'm not convinced middlewares are even the best approach possible here. Also, it will be interesting how a framework based on async IO will look and what tricks/syntactic sugar/macros will be employed to keep boilerplate code down.
This is a pretty big order, of course: While I enjoy using small libraries, a well designed web framework requires a lot of organisational effort for all the small pieces to fit together nicely. I think most of the 'small pieces' are already there or at least well under way, by the way. For example: The async (mio) branch of hyper looks pretty solid for HTTP1/2, the Diesel ORM is fantastic (and will, according to creator Sean Griffin, soon hit 1.0), and handling JSON will only get better with future versions of serde.
[^1]: As recently discussed in https://chrismorgan.info/blog/tween.html https://chrismorgan.info/blog/tween.html and some other posts concerning the use of sessions types in Rust.
- bjz_ 10y ago> For example: Rust's type system certainly has some nice properties to track dependencies between middlewares[^1] but I'm not convinced middlewares are even the best approach possible here. There's a good discussion of this on /r/rust: https://www.reddit.com/r/rust/comments/4lz92j/tween_a_middleware_library_experiment/ https://www.reddit.com/r/rust/comments/4lz92j/tween_a_middle... I'm pretty interested in tomakas's approach, which seems to avoid the approach of middlewares, in favor of explicitness: https://www.reddit.com/r/rust/comments/4lz92j/tween_a_middleware_library_experiment/d3rhglt https://www.reddit.com/r/rust/comments/4lz92j/tween_a_middle...