Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rhysforyou/advent-of-code-2024
Solutions for the Advent of Code 2024 written in Swift
https://github.com/rhysforyou/advent-of-code-2024
Last synced: 5 days ago
JSON representation
Solutions for the Advent of Code 2024 written in Swift
- Host: GitHub
- URL: https://github.com/rhysforyou/advent-of-code-2024
- Owner: rhysforyou
- License: unlicense
- Created: 2024-12-03T04:52:51.000Z (21 days ago)
- Default Branch: main
- Last Pushed: 2024-12-09T04:26:10.000Z (15 days ago)
- Last Synced: 2024-12-17T04:07:28.218Z (7 days ago)
- Language: Swift
- Size: 52.7 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
This package contains my solutons for the [Advent of Code 2024](https://adventofcode.com/2024) puzzles. The project is written in Swift and uses Swift Argument Parser to expose a command line interface which can be used to run each solution.
Code is organised into separate libraries for each day under `./Sources/Day[N]/` and there's an executable target in `./Sources/AdventOdCode/` which exposes each of those solutions via a CLI.
This project also makes use of a few open-source libraries to make things easier:
- [apple/swift-argument-parser](https://github.com/apple/swift-argument-parser) to provide a nice command line interface
- [pointfreeco/swift-parsing](https://github.com/pointfreeco/swift-parsing) for parsing input files into useable data structures
- [apple/swift-algorithms](https://github.com/apple/swift-algorithms) for some useful algorithms like getting every permutation of a set## Usage
This project uses the Swift Package Manager, and requires a Swift 6 toolchain to build. With a recent version of Xcode (16.0 and up), you should be able to install dependencies and run the CLI with the following command:
```shell
% swift run adventofcode day1 Inputs/day1.txt
```