AV1Master/src/main.rs

23 lines
482 B
Rust
Raw Normal View History

2020-03-24 22:21:29 +01:00
#![feature(proc_macro_hygiene, decl_macro)]
#[macro_use] extern crate rocket;
2020-03-25 02:14:49 +01:00
use std::path::PathBuf;
mod workunit;
use workunit::WUnit;
2020-03-24 22:21:29 +01:00
#[get("/")]
fn index() -> &'static str {
2020-03-25 02:14:49 +01:00
"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))
2020-03-24 22:21:29 +01:00
}
fn main() {
2020-03-25 02:14:49 +01:00
rocket::ignite().mount("/", routes![index, getJobs]).launch();
2020-03-24 22:21:29 +01:00
}