Skip to content

ljgago/advent-of-code-rust-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code Rust Starter

Run on Repl.it

A tamplate for Advent of Code write in Rust.

Usage

The project is configured for run, test and build each day independently.

For example:

# only run the day01
$ cargo run --bin day01

# only test the day02
$ cargo test --bin day02

# only build the day03
$ cargo build --bin day03

Folder structure:

 src
 └── day01
     ├── bin
     │   ├── day01.rs
     │   ├── part1.rs
     │   └── part2.rs
     ├── input.txt
     └── README.md

nix integration

You can use nix-shell to install the rust and tool dependencies used to run the project.

Replit integration

You can edit the .replit file and change the run command for different puzzles each day.

For example:

# test the day01
run = "cargo test --bin day01"

# test the day02 and run the day02 if the test pass
run = "cargo test --bin day02 && cargo run --bin day02"

Happy coding!

MIT License

About

Rust template for Advent of Code event

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published