diff --git a/rust/.gitignore b/rust/.gitignore new file mode 100644 index 0000000..c41cc9e --- /dev/null +++ b/rust/.gitignore @@ -0,0 +1 @@ +/target \ No newline at end of file diff --git a/rust/Cargo.lock b/rust/Cargo.lock new file mode 100644 index 0000000..bb24fa6 --- /dev/null +++ b/rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "advent-of-code" +version = "22.0.2" diff --git a/rust/Cargo.toml b/rust/Cargo.toml new file mode 100644 index 0000000..5bbb7ab --- /dev/null +++ b/rust/Cargo.toml @@ -0,0 +1,28 @@ +[package] +name = "advent-of-code" +version = "22.0.2" +edition = "2021" +resolver = "2" + +[profile.release] +strip = "symbols" +lto = "fat" +opt-level = 3 +codegen-units = 1 + +[profile.dev.package."*"] +opt-level = 3 +codegen-units = 1 +[profile.release.package."*"] +opt-level = 3 +codegen-units = 1 +[profile.dev.build-override] +opt-level = 3 +codegen-units = 1 +[profile.release.build-override] +opt-level = 3 +codegen-units = 1 + +[[bin]] +name = "day00" +path = "src/day00/main.rs" \ No newline at end of file diff --git a/rust/src/day00/input.txt b/rust/src/day00/input.txt new file mode 100644 index 0000000..ee01333 --- /dev/null +++ b/rust/src/day00/input.txt @@ -0,0 +1 @@ +Placeholder input \ No newline at end of file diff --git a/rust/src/day00/main.rs b/rust/src/day00/main.rs new file mode 100644 index 0000000..cc219d2 --- /dev/null +++ b/rust/src/day00/main.rs @@ -0,0 +1,11 @@ +const INPUT: &str = include_str!("input.txt"); + +mod part_1; +use part_1::part_1; +mod part_2; +use part_2::part_2; + +pub fn main() { + part_1(INPUT); + part_2(INPUT); +} diff --git a/rust/src/day00/part_1.rs b/rust/src/day00/part_1.rs new file mode 100644 index 0000000..e85f1a3 --- /dev/null +++ b/rust/src/day00/part_1.rs @@ -0,0 +1,3 @@ +pub(crate) fn part_1(input: &'static str) { + println!("Part 1 {input}") +} diff --git a/rust/src/day00/part_2.rs b/rust/src/day00/part_2.rs new file mode 100644 index 0000000..03e3285 --- /dev/null +++ b/rust/src/day00/part_2.rs @@ -0,0 +1,3 @@ +pub(crate) fn part_2(input: &'static str) { + println!("Part 2 {input}") +}