Skip to content

My solutions for the 2022 edition of the Advent of Code, using Rust and SOM (Simple Object Machine)

Notifications You must be signed in to change notification settings

Hirevo/advent-of-code-2022

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code 2022

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.

How to run

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

About

My solutions for the 2022 edition of the Advent of Code, using Rust and SOM (Simple Object Machine)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published