session 0.1.8

iron session implementation based on redis failed to build session-0.1.8
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 builds.
If you believe this is' fault, open an issue.
Visit the last successful build: session-0.1.7

session Build Status

Request session extension for the Iron web framework.

session is a fast, convenient, and flexible extension for Iron Request. Use redis as the backend data repos.


extern crate iron;
extern crate session;
extern crate rustc_serialize;
use iron::prelude::*;
use session::*;

// To run, $ cargo run --example simple
// to use, $ curl "http://localhost:3000"

fn main() {
    let mut chain = Chain::new(handler);
    let signing_key = "key-123456";
    let expire_seconds = 3600;
    let connect_str = "redis://localhost";
    chain.around(session::Session::new(signing_key, expire_seconds, connect_str));

fn handler(req: &mut Request) -> IronResult<Response> {
    let mut count = req.get_session::<usize>("count").unwrap_or(0);
    count += 1;
    req.set_session("count", &count).unwrap();
    Ok(Response::with((iron::status::Ok, format!("count:{}", &count))))


If you're using cargo, just add session to your Cargo.toml.


session = "*"

Otherwise, cargo build, and the rlib will be in your target directory.