Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lgarrison/adventofcode2024
Advent of Code 2024 🦀
https://github.com/lgarrison/adventofcode2024
Last synced: about 24 hours ago
JSON representation
Advent of Code 2024 🦀
- Host: GitHub
- URL: https://github.com/lgarrison/adventofcode2024
- Owner: lgarrison
- License: mit
- Created: 2024-12-01T03:55:11.000Z (27 days ago)
- Default Branch: main
- Last Pushed: 2024-12-22T17:50:52.000Z (6 days ago)
- Last Synced: 2024-12-22T18:32:52.712Z (6 days ago)
- Language: Rust
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Advent of Code 2024
Keeping it 🦀## 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"
}
```