2025-01-27 19:52:57 -05:00
|
|
|
mod common;
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "cardlife")]
|
2025-01-25 17:40:47 -05:00
|
|
|
mod cardlife;
|
2025-01-27 19:52:57 -05:00
|
|
|
#[cfg(feature = "robocraft")]
|
|
|
|
|
mod robocraft;
|
2025-01-25 17:40:47 -05:00
|
|
|
|
|
|
|
|
#[rocket::get("/")]
|
|
|
|
|
fn index() -> &'static str {
|
|
|
|
|
"Hello, world!"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[rocket::launch]
|
|
|
|
|
fn rocket() -> _ {
|
|
|
|
|
env_logger::init();
|
2025-01-27 19:52:57 -05:00
|
|
|
#[allow(unused_mut)]
|
|
|
|
|
let mut builder = rocket::build().mount("/", rocket::routes![index]);
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "cardlife")]
|
|
|
|
|
{builder = builder.attach(cardlife::stage());}
|
|
|
|
|
#[cfg(feature = "robocraft")]
|
|
|
|
|
{builder = builder.attach(robocraft::stage());}
|
|
|
|
|
|
|
|
|
|
builder
|
2025-01-25 17:40:47 -05:00
|
|
|
}
|
|
|
|
|
|
2025-01-27 19:52:57 -05:00
|
|
|
#[cfg(all(feature = "steam", feature = "robocraft", feature = "cardlife"))]
|
|
|
|
|
compile_error!("Feature \"steam\" cannot work with features \"cardlife\" and \"robocraft\" at the same time");
|
|
|
|
|
|