about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 21d527a..5538077 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,6 @@
+use serde::{Deserialize, Serialize};
+use surrealdb::{RecordId, Surreal, engine::local::RocksDb};
+
 use std::io::Read;
 use std::process::{Child, Command, Stdio};
 
@@ -10,7 +13,8 @@ fn exec(image: &str, args: Vec<&str>) -> Result<Child, Box<dyn std::error::Error
     Ok(child)
 }
 
-fn main() -> Result<(), Box<dyn std::error::Error>> {
+#[tokio::main]
+async fn main() -> Result<(), Box<dyn std::error::Error>> {
     let mut child = exec("java", vec!["-jar", "minecraft_server.jar"])?;
     std::thread::sleep(std::time::Duration::from_secs(60));
     let mut buf: [u8; 512] = [0; 512];