Advent of Code Year 2021 - Rust
Advent of Code year 2021 challenges done in Rust
Set Up a "New Project"
Navigate to desired directory and enter the following into the terminal:
cargo new title_of_new_project
Rust Tool Chain Commands
Compile: cargo build
Check code (but doesn't produce an executable): cargo check
Compile and Run the Project: cargo run
Build documentation of all dependencies: cargo doc --open
Building for release: cargo build
.gitignore
# RUST
## Generated by Cargo in Rust projects
## will have compiled files and executables
debug/
# Generated by Cargo
# will have compiled files and executables
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
## Ignore all executables
*.exe