joshleaves / advent-rs

Doing "Advent of Code" exercises in Rust with all the proper testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

advent-rs

dependency status

As I said, Consistency is hard, and I haven't taken the time to pick up a new language in quite a while.

I'm also adding notes that may be useful if you're (like me) discovering Rust:

Regarding style rules

I'm gonna use a mix of what cargo fmt does, with some stuff that feels more natural to me.

Testing guidelines

Strangely, testing feels more natural in Rust than in Ruby. Since I've already done these exercises before, I will use Test-driven Development again to write the test, then make the code function.

Benchmarking

I use criterion.rs for benchmarking, as it feels like the best option. I try to strive for the most effective solutions, without cutting corners. I could probably gain a lot more time in some spaces, but I'm going at my own speed for now.

The speeds I'm reporting are what my Mac M2 reports, depending on how many Chrome tabs I got opened. It's just to give myself a pat on the back.

Documentation

I am playing with RustDoc and am trying a few things. Maybe all sample tests will be moved into documentation tests, which I think is a very neat feature.

About

Doing "Advent of Code" exercises in Rust with all the proper testing


Languages

Language:Rust 99.6%Language:D2 0.4%