chore: split executable into lib and main
This commit is contained in:
12
gameserver/src/lib.rs
Normal file
12
gameserver/src/lib.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
#![feature(let_chains)]
|
||||
use anyhow::Result;
|
||||
|
||||
mod net;
|
||||
mod util;
|
||||
|
||||
use net::gateway::Gateway;
|
||||
|
||||
pub async fn start_gameserver() -> Result<()> {
|
||||
let mut gateway = Gateway::new("0.0.0.0", 23301).await?;
|
||||
Box::pin(gateway.listen()).await
|
||||
}
|
||||
Reference in New Issue
Block a user