From acbead360ad782ea10b9bddcaa7dd301f7f5cfbd Mon Sep 17 00:00:00 2001 From: alemi Date: Fri, 16 Feb 2024 00:40:42 +0100 Subject: [PATCH] chore: initial commit --- .editorconfig | 17 +++++++++++++++++ .gitignore | 1 + .rustfmt.toml | 1 + Cargo.toml | 38 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 .rustfmt.toml create mode 100644 Cargo.toml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..af278fc --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +# Default to Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +indent_style = tab +indent_size = 4 + +[*.rs] +indent_size = 2 + +[*.js] +indent_size = 2 + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 0000000..218e203 --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1 @@ +hard_tabs = true diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..724f0c7 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,38 @@ +[package] +name = "mumble-stats-api" +version = "0.1.0" +edition = "2021" +authors = [ "alemi " ] +readme = "README.md" +description = "check mumble server stats using http requests" +#keywords = [] +#documentation = "" +#repository = "https://git.alemi.dev/{{project-name}}" +#license = "LICENSE" + +[dependencies] +byteorder = "1.5.0" +chrono = "0.4.34" +clap = { version = "4.5.0", features = ["derive"] } +tokio = { version = "1.36.0", features = ["full"] } + +[dev-dependencies] + +[features] +default = [] + +[lints.rust] +unsafe_code = "forbid" + +[lints.clippy] +pedantic = "warn" # extra lints, maybe obnoxious, just warn +nursery = "warn" # experimental lints, may include false positives, just warn +unwrap_used = "warn" # warn for every unwrap used +#cargo = "warn" # warn about cargo manifest lints, this is annoying at the beginning + +[profile.release] # make small binaries! will take quite longer, from https://github.com/johnthagen/min-sized-rust +opt-level = 'z' # optimize for size +lto = true # enable Link Time Optimisation: don't link unused stuff +codegen-units = 1 # reducing codegen units slows it down but allows for better optimization +panic = 'abort' # abort on panic: don't include code to show what went wrong in release +strip = "symbols" # strip symbols from binary: have fun debugging on prod! :)