Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Rustful
A light web micro-framework for Rust with REST-like features. The main purpose of Rustful is to create a simple, modular and non-intrusive foundation for HTTP applications. It has a mainly stateless structure, which naturally allows it to run both as one single server and as multiple instances in a cluster.
Some of the features are:
- Generic response handlers. Just use a function or implement the Handler trait.
- Unified log system to make sure everything is working together.
- Some handy macros reduces risk for typos and makes life easier.
- Pluggable request and response filtering.
- Variables and recursive wildcards in routes.
#Getting Started
##Cargo.toml Entries
Add the following lines to your Cargo.toml
file:
[]
= "0.2"
###Cargo Features
Some parts of Rustful can be toggled using Cargo features:
rustc_json_body
- Parse the request body as JSON. Enabled by default.
##Write Your Server
Here is a simple example of what a simple project could look like. Visit
http://localhost:8080
or http://localhost:8080/Olivia
(if your name is
Olivia) to try it.
//Include macros to be able to use `insert_routes!`.
extern crate rustful;
use Error;
use ;
use Get;
//Dodge an ICE, related to functions as handlers.
);
##Contributing Yes, please! You can always post an issue or (even better) fork the project, implement your idea or fix the bug you have found and send a pull request. Just remember to test it when you are done. Here is how:
- Run
cargo test
to run unit, documentation and compile tests. - Run
cargo run --example example_name
to run an example and make sure it behaves as expected.