diff --git a/dev.sh b/dev.sh new file mode 100755 index 0000000..9c77607 --- /dev/null +++ b/dev.sh @@ -0,0 +1 @@ +cargo watch -c -q -x "run -q" \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index e7a11a9..630d3ca 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,18 @@ +// cargo watch -c -q -x "run -q" + +use std::fs::read; + fn main() { - println!("Hello, world!"); + let file: &str = "../NBTify/test/nbt/hello_world.nbt"; + println!("{}",file); + + let data: Vec = read(file).unwrap(); + println!("{:?}",&data); } + +// https://kerkour.com/rust-functional-programming +// https://dev.to/jorgecastro/hot-reload-in-rust-with-cargo-watch-5bon +// https://doc.rust-lang.org/cargo/commands/cargo-run.html +// https://stackoverflow.com/questions/31192956/whats-the-de-facto-way-of-reading-and-writing-files-in-rust-1-x +// https://stackoverflow.com/questions/28123923/how-do-i-print-a-vector-of-u8-as-a-string +// https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/share/doc/rust/html/std/path/struct.Path.html \ No newline at end of file