Skip to content

Commit

Permalink
[ADD] added baseline config struct
Browse files Browse the repository at this point in the history
  • Loading branch information
lordofwizard committed Oct 17, 2024
1 parent c4e10d1 commit 29f4bda
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 0 deletions.
102 changes: 102 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ edition = "2021"

[dependencies]
clap = { version = "4.5.20", features = ["derive"] }
serde = { version = "1.0.210", features = ["derive"] }
toml = "0.8.19"
23 changes: 23 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
use serde::{Serialize, Deserialize};
#[derive(Serialize, Deserialize, Debug)]
struct Config {
mcserver: McServer,
server: Server,
}

#[derive(Serialize, Deserialize, Debug)]
struct McServer {
project_name: String,
logfile: String,
tunnel: String,
java: String,
}

#[derive(Serialize, Deserialize, Debug)]
struct Server {
online_mode: bool,
version: String,
server_type: String,
category: String,
providor: String,
}
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ mod run;
mod setup;
mod start;
mod stop;
mod config;


use run::Run;
fn main() {
println!("Hello, world!");
Expand Down

0 comments on commit 29f4bda

Please sign in to comment.