Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies
21–30 of 75 posts
Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies
#22> Private Cookies # > To encrypt private cookies, Rocket uses the 256-bit key specified in the secret_key configuration parameter. If one is not specified, Rocket automatically generates a fresh key at launch. Seems like a pretty clever idea. Do other servers/middlewares offer a similar feature? Seems like it would complicate deployment/scaling a bit if the secret has to be sent to all the nodes. Especially if they c…
Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies
#23I don't have any experience in Rust. From what I read, Rust is a low level / system programming language. Comparing to dynamic languages like Python, I understand that Rust is much faster. However, Python is fast enough for most web applications. So why should I use Rust in web development? Even if the library ecosystem were mature enough, could I expect my productivity could become nearly high as in Python?
I'd say it's true that Python is fast enough for most web servers. Rather than strictly considering performance, I'd guess that people seeking to do webdev in Rust are looking to leverage Rust's static analysis to improve resilience, trading off up-front productivity for long-term maintainability (which isn't to denigrate Python, which I love, but fearless refactoring really is something that compiled langs excel at)…
Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies
#24Since its async, do you have to develop in it using callbacks?
Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies
#25I actually really love the restrictions on fairings. I'm working on a project right now that uses Node.js with Express, and there are all of these pieces of middleware that won't compose at all, and I often find myself ripping things out and putting them in new functions. By having clear delineations between fairings, request guards, and data guards, I think you can really avoid making a lot of design mistakes. I'm g…
> Rocket says it requires a nightly version of rust[0] - why is that necessary I often joke that Rocket deliberately uses every single unstable feature solely to stymie the Rust developers' attempt to prioritize which features to stabilize. :P I'm kidding of course (hi, sbenitez!), but it's true that I've never seen any Rust project so taken with nightly features as Rocket is.
Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies
#26I don't have any experience in Rust. From what I read, Rust is a low level / system programming language. Comparing to dynamic languages like Python, I understand that Rust is much faster. However, Python is fast enough for most web applications. So why should I use Rust in web development? Even if the library ecosystem were mature enough, could I expect my productivity could become nearly high as in Python?
Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies
#27I actually really love the restrictions on fairings. I'm working on a project right now that uses Node.js with Express, and there are all of these pieces of middleware that won't compose at all, and I often find myself ripping things out and putting them in new functions. By having clear delineations between fairings, request guards, and data guards, I think you can really avoid making a lot of design mistakes. I'm g…
The author of Rocket explicitly wants to use Rocket to experiment with new features. A lot of the stuff could be done on stable (but in a more annoying way), but it's easier with experimental features. (I discussed moving it to stable with the author)
Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies
#28Regarding fairings, it seems a missing "middleware" case might be the sorts of things that cause redirects on entry (e.g. redirect routes with/without trailing slashes to the latter as a super trivial example). Is that something you'd expect to support in some way? I think that's something that doesn't feel like it maps either to guards or fairings well at the moment.
I did see where you mentioned your dislike of rails/sinatra/... style blunt force middleware, fwiw.
Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies
#29Earlier quoted context omitted.
I this is quite similar to Rails; by default Rails includes webbrick or puma.
OK, browsing through their code, I see they use Hyper.
Personally I'm more tempted by something like Susanoo: https://github.com/ubnt-intrepid/susanoo/