Live data from Hacker News

Show HN: Rocket – Web Framework for Rust

rocket.rs

1–10 of 123 posts

Re: Show HN: Rocket – Web Framework for Rust

#2
This demonstrates the brilliance of Rust's syntax extensions. Not only is the code more readable and ergonomic, but also type safe.

Errors or mismatches in implementations are caught at compile time, saving minutes (or potentially hours or days) in frustrating debugging.

Nice work! This looks fantastic.

Re: Show HN: Rocket – Web Framework for Rust

#3
It's my understanding that the current Rust web framework landscape is dealing with moving over to futures (example: https://github.com/hyperium/hyper/issues/934).

The framework seems to nail the API, but what's it doing down at the bottom of the stack? Any benchmarks?

Apologies if they are somewhere obvious, but didn't see it on the site.

Re: Show HN: Rocket – Web Framework for Rust

#4

This demonstrates the brilliance of Rust's syntax extensions. Not only is the code more readable and ergonomic, but also type safe. Errors or mismatches in implementations are caught at compile time, saving minutes (or potentially hours or days) in frustrating debugging. Nice work! This looks fantastic.

> This demonstrates the brilliance of Rust's syntax extensions.

Sadly this functionality currently requires nightly or using a code generating build script via syntex :(

(Rocket currently only works with nightly, but someone could pretty easily add a syntex port since the APIs are the same)

With macros 1.1, some of this functionality is available on stable, but not the functionality needed by this. I don't know if we plan a "macros 1.2" that stabilizes tokentree expansion for all decorators (not just type item decorators). ("Macros 2.0" is the final polished version of Rust procedural and regular macros, for which there are concrete plans but it will take time to get to)

Re: Show HN: Rocket – Web Framework for Rust

#5

It's my understanding that the current Rust web framework landscape is dealing with moving over to futures (example: https://github.com/hyperium/hyper/issues/934 ). The framework seems to nail the API, but what's it doing down at the bottom of the stack? Any benchmarks? Apologies if they are somewhere obvious, but didn't see it on the site.

https://github.com/SergioBenitez/Rocket#future-improvements

Today, it's built on top of hyper, which is still synchronous. It's also only using the lowest parts of hyper, apparently.

There's a branch for tokio integration, but needs the tokio 0.1 release, which is coming soon but not _quite_ out yet.

Re: Show HN: Rocket – Web Framework for Rust

#9

This demonstrates the brilliance of Rust's syntax extensions. Not only is the code more readable and ergonomic, but also type safe. Errors or mismatches in implementations are caught at compile time, saving minutes (or potentially hours or days) in frustrating debugging. Nice work! This looks fantastic.

> This demonstrates the brilliance of Rust's syntax extensions. Sadly this functionality currently requires nightly or using a code generating build script via syntex :( (Rocket currently only works with nightly, but someone could pretty easily add a syntex port since the APIs are the same) With macros 1.1, some of this functionality is available on stable, but not the functionality needed by this. I don't know if we…

For those not watching the compiler development traffic, macros 1.1 (which will enable things like #[derive(FromForm))]) could land in stable as soon as 6 weeks from now. We haven't really started thinking about a "macros 1.2" yet, so syntex will still have some use.

If you want to know more about our glorious macros 1.1 future, David Tolnay just have a great meetup talk all about this a few weeks ago:

https://air.mozilla.org/rust-meetup-december-2016-12-15/

Re: Show HN: Rocket – Web Framework for Rust

#10

It's my understanding that the current Rust web framework landscape is dealing with moving over to futures (example: https://github.com/hyperium/hyper/issues/934 ). The framework seems to nail the API, but what's it doing down at the bottom of the stack? Any benchmarks? Apologies if they are somewhere obvious, but didn't see it on the site.

Checking the source, it looks like it uses hyper under the hood for the nuts and bolts, so presumably it will benefit from the move to futures without too much effort
Post reply on HN