I've recently come to try out workspaces in Rust and I love them. Rust workspaces are groups of crates that work together. Here are some selling points:
Setting up couldn't be simpler - all you need is a single Cargo.toml
file with a single section that defines what crates you have in the workspace. Example:
[workspace]
members = ["api", "core", "cli"]
All of your crates within the workspace have a common Cargo.lock
that lives in the ma...
Description: https://adventofcode.com/2022/day/3
Solution: https://github.com/stygian91/advent-of-code-2022/tree/master/rs/q_3
Day 3 was not very exciting - the exercise consisted of some basic string manipulation.
Description: https://adventofcode.com/2022/day/4
Solution: [https://github.com/stygian91/advent-of-cod...
I've created a new repo for the AoC 2022 here https://github.com/stygian91/advent-of-code-2022/tree/master/
Today's exercise was pretty easy again (you can find it here). The most fun part was modelling the problem with Rust's nice enums and match statements. I made a utility method that gives you the corresponding hand based on the player's hand and the desired result. I used this to f...
Advent of code 2022 has started.
The first day's task is certainly easy, as expected. You can find the exercise description here: https://adventofcode.com/2022/day/1.
I'm using advent of code as an exercise to get more familiar with Rust. I am going to be using .unwrap()
here as I don't feel like proper error handling is needed in the context of these exercises.
I feel like this solution is simple enough that understanding the code should be easy...