An Asynchronous, Extensible, Micro web framework for Rust.
#[service]proc_macro not only derives the
ArcServicetrait for your route handler, but also marks it as
#[async]so you can await on futures in your route handlers with no extra stress.
proc_macroswhich are only available on the nightly channel, using the
Add this to your
arc-reactor = "0.2"
Originally, arc-reactor was designed for the nightly compiler. But instabilities in
libprocmacro cause it to break everytime a new nightly compiler is released.
So by default, arc-reactor no longer uses the nightly compiler, and will work out of the box with the stable compiler. 🎉 This means experimental nightly features including proc_macros are only available behind the
unstable feature flag.
If you wish to use arc-reactor, with the nightly compiler and unstable feature enabled: It is recommended that you lock down the compiler version. Until
libprocmacro is stablized.
If you wish to use arc-reactor with it's default features:
ArcServiceis implemented for all functions that satisfy the signature
Fn(Request, Response) -> FutureResponse
MiddleWare<Request>is implemented for all functions that satisfy the signature
Fn(Request) -> MiddleWareFuture<Request>
MiddleWare<Response>is implemented for all functions that satisfy the signature
Fn(Response) -> MiddleWareFuture<Response>
futures-rsis re-exported instead of
await!on futures in your ServiceHandlers and MiddleWares.
Check out the examples folder and the api documentation to get a feel for how
arc reactor works.
It's well documented and should get you up and running in no time.
It is Strongly recommended that you read the design document, as it gives you full disclosure on arc-reactor's internals, as well as the design decisions that were made.
Arc-Reactor is highly extensible via middlewares which are placed in the
Some of the things are missing include:
Feel free to submit a PR.
Refer to License.