From 756d77a1d8660668bf219befff8b6448d9a479b2 Mon Sep 17 00:00:00 2001 From: ArloFilley Date: Thu, 29 Sep 2022 09:37:35 +0100 Subject: [PATCH] Rust webserver now working --- .gitignore | 2 ++ Cargo.toml | 9 +++++++++ src/main.rs | 7 +++++++ 3 files changed, 18 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..869df07 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +Cargo.lock \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..0fcacf0 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "cs_coursework" +version = "0.1.0" +edition = "2021" + +[dependencies] + +[dependencies.rocket] +version = "0.5.0-rc.2" \ No newline at end of file diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..f5047ae --- /dev/null +++ b/src/main.rs @@ -0,0 +1,7 @@ +#[macro_use] extern crate rocket; +use rocket::{Rocket, Build}; + +#[launch] +fn rocket() -> Rocket { + rocket::build() +} \ No newline at end of file