Skip to content

A template for writing your rust solutions to advent of code problems

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

CalumMackenzie-Chambers/aoc-rust-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of code rust template

Status GitHub Issues GitHub Pull Requests License License


Template for keeping all of your rust advent of code solutions in one place.

📝 Table of Contents

🏁 Getting Started

To use the repository, rust must be installed on your device. You can find installations instructions here

To get started using this template just click the use this template button at the top of the repository.

Open src/solutions/day_01.rs for the day that you wish to solve and fill out the body for functions part_a and part_b. You will need to provide your data file given by Advent of Code. This file should be saved in ../data/input.

You can run these functions by typing cargo solve 1

For further usage instructions see usage

🔧 Running the tests

Each solution file contains two tests by default. One test for part a and another for part b.

These tests have to be provided with the test data that is given in the advent of code question. This should be put in the folder ../data/input/test_data with a file name XX.txt, e.g 01.txt for day 1

You can add extra tests as required in the tests module.

You can use the following commands to run tests:

# Run all tests
cargo test

# Run tests for day 1
cargo test 01

🎉 Acknowledgements

About

A template for writing your rust solutions to advent of code problems

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages