diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..f9bf312 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "nbt-rust" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..5362f3b --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "nbt-rust" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..afeeb3c --- /dev/null +++ b/src/main.rs @@ -0,0 +1,5 @@ +mod data; + +fn main() { + println!("Hello, world!"); +} diff --git a/src/read.rs b/src/read.rs new file mode 100644 index 0000000..a5a3488 --- /dev/null +++ b/src/read.rs @@ -0,0 +1 @@ +use crate::data::NbtValue; \ No newline at end of file diff --git a/src/rustfmt.toml b/src/rustfmt.toml new file mode 100644 index 0000000..83ba4b7 --- /dev/null +++ b/src/rustfmt.toml @@ -0,0 +1,23 @@ +# cargo fmt config + +# 最大行长 +max_width = 150 +# 链式调用的最大长度 +chain_width = 100 +# 数组的最大长度 +array_width = 100 +# 函数参数的最大长度 +attr_fn_like_width = 100 +# 函数调用参数的最大长度 +fn_call_width = 80 +# 简单函数格式化为单行 +fn_single_line = true + +# 自动对齐最大长度 +enum_discrim_align_threshold = 5 +# 字段初始化使用简写 +use_field_init_shorthand = true +# 是否使用彩色输出 +color = "Always" + +edition = "2021"