Skip to content

Looks interesting, but... #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dantho opened this issue Dec 1, 2020 · 3 comments
Open

Looks interesting, but... #2

dantho opened this issue Dec 1, 2020 · 3 comments

Comments

@dantho
Copy link

dantho commented Dec 1, 2020

Perhaps I'm a newbie, but how do you build / use this template?

Your Readme is not much help to me. :(

I've stumbled around with cargo build and have populated the src directory with empty solutions, but I don't know what to do next, or how to use the .ENV file.

@Kushagra-0801
Copy link
Owner

  1. Do an initial build with the AOC_YEAR and AOC_SESSION environment variables set.
    After this you can delete build.rs.
  2. Write your code in the generated files in src/solutions/day$i.rs.
  3. Run cargo run -- init <day> to download your input.
  4. Run cargo run -- run <day> [--part <part>] [--extra arg1 arg2 arg3] [--input path/to/input]
    In case you don't know, the part in [] is optional. Skipping --part will run both part 1 and part 2. Skipping --extra will give an empty Vec<T> of extra args. Skipping --input will look for the download input. Do note that input is not downloaded automatically and you need to run step 3.

@Kushagra-0801
Copy link
Owner

I hope that fixes your doubt.

@dantho
Copy link
Author

dantho commented Dec 2, 2020

Thanks. That's helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants