Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lgarrison/adventofcode2023
Advent of Code 2023, in Rust yet again (it's too much fun!)
https://github.com/lgarrison/adventofcode2023
Last synced: 26 days ago
JSON representation
Advent of Code 2023, in Rust yet again (it's too much fun!)
- Host: GitHub
- URL: https://github.com/lgarrison/adventofcode2023
- Owner: lgarrison
- Created: 2023-12-01T02:04:41.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-28T17:18:26.000Z (almost 1 year ago)
- Last Synced: 2024-10-16T01:30:49.169Z (2 months ago)
- Language: Rust
- Size: 191 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code 2023
Third time's the charm! 🦀[2022 in Rust](https://github.com/lgarrison/adventofcode2022)
[2021 in Rust](https://github.com/lgarrison/adventofcode2021)## GPT-4 Says...
```
Why did the Rust programmer enjoy the Advent of Code so much? Because they got to unwrap() new challenges every day!
```## Usage
To make a new day:
1) `$ cd src; cp -r template dayXX`
1) Put the input in `src/dayXX/input.txt`
1) Add a new `[[bin]]` section to `Cargo.toml`To run:
- `$ cargo run --bin dayXX`To run fast:
- `$ cargo run --release --bin dayXX`## Flatiron VS Code Configuration Note
Getting the `rust-analyzer` VS Code extension to recognize the rust installed in the modules was a huge pain. The nicest solution would be if VS Code would allow you to set per-workspace environment variables (or even source an environment setup script) so that the extension host can pick up the right `PATH`. But if such a mechanism exists, I can't find it.However, the rust extension does allow you to set arbitrary environment variables, so we can use it to modify the `PATH`. It's not such a bad solution, but the rust devs rightly point out that it's fragile to have to set the rust environment for the analyzer separately from where one sets it up for compilation.
My `settings.json` now has an entry like:
```
"rust-analyzer.server.extraEnv": {
"PATH": "/mnt/sw/nix/store/2grrzm5kq84sxpxsfwmnzl60p53l1hn6-rust-1.70.0/bin"
}
```