Live data from Hacker News

Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies

rocket.rs

1–10 of 75 posts

Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies

#3
post #2

What's not clear from the front page. Is it its own Web server? Is it a framework which uses another Web server? I think that would be useful to clarify from the start.

It's very similar to nodejs web frameworks. If you start it you have a working webserver with your application in it.

Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies

#4
> 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 could silently ignore it if you accidentally don't configure the key for some nodes.

Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies

#5
post #3
post #2

What's not clear from the front page. Is it its own Web server? Is it a framework which uses another Web server? I think that would be useful to clarify from the start.

It's very similar to nodejs web frameworks. If you start it you have a working webserver with your application in it.

OK, that makes it clear, because for example Rails require existing Web server in contrast.

Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies

#6
post #4

> 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…

Rails had encrypted cookies for ages

Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies

#7
post #5
post #3

Earlier quoted context omitted.

It's very similar to nodejs web frameworks. If you start it you have a working webserver with your application in it.

OK, that makes it clear, because for example Rails require existing Web server in contrast.

I this is quite similar to Rails; by default Rails includes webbrick or puma.

Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies

#8
post #5

Earlier quoted context omitted.

OK, that makes it clear, because for example Rails require existing Web server in contrast.

I this is quite similar to Rails; by default Rails includes webbrick or puma.

OK, browsing through their code, I see they use Hyper.

Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies

#9
post #6
post #4

> 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…

Rails had encrypted cookies for ages

I think wyldfire was referring to the part about generating a new key on launch. Of course, Rails might do that too, for all I know.

Re: Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies

#10
I 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 going to try out Rust some more and definitely play around with this framework! The only thing that bothers me is that Rocket says it requires a nightly version of rust[0] - why is that necessary? I thought Rust was pretty stable by now.

[0] https://rocket.rs/guide/getting-started/#minimum-nightly

Post reply on HN