These are my solutions for the 2022 edition of the Advent of Code.
The solutions are all implemented using both Rust and SOM (Simple Object Machine).
The directory layout and code organization methods are quite similar to my last year's AoC (2021) repository.
Here is how you can run each of the Rust solutions:
# This will run the solution for day 1.
cargo run --release -- 1
# This will run the solution for day 2.
cargo run --release -- 2
# And so on, up to day 25...
Here is how you can run each of the SOM solutions using SOM-java or SOM-rs:
# using `som-java` for day 1 and day 2:
${SOM_JAVA_DIR}/som.sh -cp ${SOM_CORE_LIB_DIR}:som:som/utils AoC 1
${SOM_JAVA_DIR}/som.sh -cp ${SOM_CORE_LIB_DIR}:som:som/utils AoC 2
# using `som-rs` for day 1 and day 2:
som-interpreter-bc -c ${SOM_CORE_LIB_DIR} som som/utils -- AoC 1
som-interpreter-bc -c ${SOM_CORE_LIB_DIR} som som/utils -- AoC 2
You can also call each day using their classes more directly, the following way:
# using `som-java` for day 1 and day 2:
${SOM_JAVA_DIR}/som.sh -cp ${SOM_CORE_LIB_DIR}:som:som/utils Day01
${SOM_JAVA_DIR}/som.sh -cp ${SOM_CORE_LIB_DIR}:som:som/utils Day02
# using `som-rs` for day 1 and day 2:
som-interpreter-bc -c ${SOM_CORE_LIB_DIR} som som/utils -- Day01
som-interpreter-bc -c ${SOM_CORE_LIB_DIR} som som/utils -- Day02