work units

This commit is contained in:
Daniel Løvbrøtte Olsen
2020-03-25 02:14:49 +01:00
parent 53d016ceb6
commit a1512e6889
3 changed files with 94 additions and 3 deletions

View File

@@ -2,12 +2,22 @@
#[macro_use] extern crate rocket;
use std::path::PathBuf;
mod workunit;
use workunit::WUnit;
#[get("/")]
fn index() -> &'static str {
"Hello, world!"
"Welcome to the AV1 Encoder Master Server"
}
#[get("/get_work/<max_length>")]
fn getJobs(max_length: u32, ) -> Result<String, std::io::Error> {
let mut work = WUnit::default();
Ok(format!("{:#?}", work))
}
fn main() {
rocket::ignite().mount("/", routes![index]).launch();
rocket::ignite().mount("/", routes![index, getJobs]).launch();
}