Skip to content

Commit

Permalink
Initial Commit!
Browse files Browse the repository at this point in the history
Going to try out Rust again. This time, after looking into C and C++ again, I think I will like Rust more, even with it's trade-offs that are initially nudging me towards using C, since it allows for more leeway in terms of coding styles and opinions. I think you get a lot more maintainability with Rust though; for me Cargo is the main beneficial thing, as well as the borrow checker. I'm not sure how I feel about snake_case or indentation and things like that, but much cooler expandable types and such are extra intriguing to me.

Yeah so I want to try implementing an NBT implementation in Rust, this case it's more for the sake of seeing how it might work in Rust, as well as getting me to learn some Rust in general.

/~https://github.com/zugebot/LegacyEditor
https://stackoverflow.com/questions/1353022/reflection-support-in-c (I'd like to be able to log objects to the console, doesn't seems like C-like has that?)
https://www.reddit.com/r/rust/comments/bya8k6/programming_with_rust_vs_c_c/
https://doc.rust-lang.org/rust-by-example/custom_types.html (This is what inspired me to want to look into Rust again, I'm curious how objects can work here, and how using Rust primitives can work for NBT's building blocks. I want to bring NBTify's representation model to native code, and see whether it works or not)
https://medium.com/dwelo-r-d/using-c-libraries-in-rust-13961948c72a (https://www.google.com/search?q=use+c+libraries+in+rust, can you do this? I'd like to include zlib (Rust probably already has that?), and some sort of lzx and leveldb implementations as well.)
https://rust-lang.github.io/async-book/ (Didn't dive into this section yet, but I would like to see how Rust handles async code; I have really started to like how JS/TS handles it)
/~https://github.com/github/gitignore/blob/main/Rust.gitignore (For this project; `cargo new rust_nbt`, then I added this gitignore template)
https://www.reddit.com/r/rust/comments/hhq5ar/even_better_toml_proper_toml_support_for_visual/ (Yay!)
https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml
  • Loading branch information
Offroaders123 committed Dec 18, 2023
0 parents commit bc00148
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
# Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
7 changes: 7 additions & 0 deletions Cargo.lock

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

8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "rust_nbt"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

0 comments on commit bc00148

Please sign in to comment.