#![feature(plugin)] #![plugin(rocket_codegen)] extern crate rocket; use rocket::Rocket; #[get("/hello//")] fn hello(name: &str, age: i8) -> String { format!("Hello, {} year old named {}!", age, name) } #[get("/hello/")] fn hi<'r>(name: &'r str) -> &'r str { name } fn main() { Rocket::new("localhost", 8000).mount_and_launch("/", routes![hello, hi]); }