Comments (4)
Also sorry for randomly dropping a bunch of issues on you on Christmas.
from rocket.
No worries on the issues! I appreciate your diligence. :)
I've given some thought to this, and at present, I'd rather keep derives as they are. My main argument against moving to macros 1.1 is that it adds another crate, and thus another line to src/main.rs
. I expanded on this in the following comment: rust-lang/rust#37128 (comment).
That being said, it may be possible to reexport the derives from the core rocket
crate, and so you'd only need to add #[macro_use]
to extern crate rocket
. If the derive code for macros 1.1 is significantly cleaner, for whatever reason, and this reexport can indeed be done, then I might be convinced. Still, I worry that this avenue might be confusing to users. Why should they import a plugin via #[plugin(...)]
and do a #[macro_use]
? Codegen can be a confusing subject, and I'd like to avoid all means to further confusion.
from rocket.
It would need to be a separate crate as it's a separate compilation mode.
from rocket.
I'm okay with having another crate as long as users don't need to explicitly import it. What I was referring to was that it might be possible to, in the rocket
crate, add something like:
#[macro_reexport] extern crate rocket_derive;
And then users would write:
#[macro_use] extern crate rocket;
Is this what you're referring to when you say it won't work? I haven't explored this myself.
from rocket.
Related Issues (20)
- Possible Incompleteness HOT 1
- Possible Incompleteness HOT 1
- doc: change `&ContentType` with `&Accept` in the list of implementations of `FromRequest` HOT 1
- [Feature]: Enhanced State Mutation for Effortless Handling of Shared Resources HOT 5
- Guide navigation causes relative links inside articles to 404 HOT 1
- Redirection to a route which takes a vector parameter results in an error HOT 1
- Allow users to create of Data<'r> objects HOT 5
- Validation not invoked on Json HOT 6
- Implement `FromForm` for `Range` HOT 1
- Missing license files in rocket_codegen-0.5.0.crate HOT 2
- Add SQLite extensions HOT 2
- Middleware that handles requests for static resources HOT 2
- Unable to build: no `Serialize` in `de` HOT 3
- Add default content_type for TempFile uploads HOT 2
- Could not find `json` in `serde` HOT 1
- Can't change IP that Rocket starts from. HOT 1
- Clippy lint: temporary with significant `Drop` can be early dropped HOT 1
- Rocket sometimes resets connection instead of responding with 413 error response HOT 2
- MiniJinja can't be used for templates HOT 1
- Routing by hostname HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocket.