3 ms·
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 mid
by jamescostian 9y ago
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 https://rocket.rs/guide/getting-started/#minimum-nightly
- moosingin3space 9y agoRocket uses compiler plugins to do its magic, and compiler plugins aren't stable.
- lholden 9y agoRust Stable is great, but not all of the macro (the Macro 2.0 stuff) support is on the stable release channel yet. There are still some things you can't do on stable (or can do, but inconveniently). (Rocket also depends on a few other nightly only features. Things will likely change in the future once the Macro stuff stabilizes though) There is also the matter of compiler plugins... which may never land in stable.
- Manishearth 9y agoSyntax extension plugins are probably going to happen, folks are working on it.
- leshow 9y agoRocket uses some advanced codegen and procedural macro stuff that's not on stable if memory serves. The annotations for routes, for example.
- Manishearth 9y agoThe 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)
- jamescostian 9y agoThat sounds like a lot of fun!
- kibwen 9y ago> 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.
- steveklabnik 9y agoFor that list of features and the discussion around them, https://github.com/SergioBenitez/Rocket/issues/19 https://github.com/SergioBenitez/Rocket/issues/19
- legulere 9y agoi128 really surprises me. Why would a web framework need 128 bit integers?
- fnord123 9y agoIt appears u128s are used to intern strings. i.e. efficient uuids. https://github.com/SergioBenitez/Rocket/blob/master/codegen/src/utils/meta_item_ext.rs https://github.com/SergioBenitez/Rocket/blob/master/codegen/...