summaryrefslogtreecommitdiffstats
path: root/2015
diff options
context:
space:
mode:
authoralyx <alyx@aleteoryx.me>2023-11-20 17:12:15 -0500
committeralyx <alyx@aleteoryx.me>2023-11-20 17:12:15 -0500
commitccf1a5828fc26a82545c7accf1ce7916daa08a2d (patch)
tree2428c1374e8f9bcbfd00c8090606f4781d083401 /2015
parent4810e24657a5931ea79be3fc3ee3e108fe40282e (diff)
downloadadventofcode-ccf1a5828fc26a82545c7accf1ce7916daa08a2d.tar.gz
adventofcode-ccf1a5828fc26a82545c7accf1ce7916daa08a2d.tar.bz2
adventofcode-ccf1a5828fc26a82545c7accf1ce7916daa08a2d.zip
Reorganize using workspaces
Diffstat (limited to '2015')
-rw-r--r--2015/rs/Cargo.lock40
-rw-r--r--2015/rs/Cargo.toml46
-rw-r--r--2015/rs/code/eight/Cargo.toml8
-rw-r--r--2015/rs/code/eight/src/input.txt (renamed from 2015/rs/src/eight.txt)0
-rw-r--r--2015/rs/code/eight/src/main.rs (renamed from 2015/rs/src/eight.rs)2
-rw-r--r--2015/rs/code/five/Cargo.toml8
-rw-r--r--2015/rs/code/five/src/input.txt (renamed from 2015/rs/src/five.txt)0
-rw-r--r--2015/rs/code/five/src/main.rs (renamed from 2015/rs/src/five.rs)2
-rw-r--r--2015/rs/code/four/Cargo.toml9
-rw-r--r--2015/rs/code/four/src/main.rs (renamed from 2015/rs/src/four.rs)0
-rw-r--r--2015/rs/code/nine/Cargo.toml8
-rw-r--r--2015/rs/code/nine/src/input.txt (renamed from 2015/rs/src/nine.txt)0
-rw-r--r--2015/rs/code/nine/src/main.rs (renamed from 2015/rs/src/nine.rs)2
-rw-r--r--2015/rs/code/one/Cargo.toml8
-rw-r--r--2015/rs/code/one/src/input.txt (renamed from 2015/rs/src/one.txt)0
-rw-r--r--2015/rs/code/one/src/main.rs (renamed from 2015/rs/src/one.rs)2
-rw-r--r--2015/rs/code/seven/Cargo.toml8
-rw-r--r--2015/rs/code/seven/src/input.txt (renamed from 2015/rs/src/seven.txt)0
-rw-r--r--2015/rs/code/seven/src/main.rs (renamed from 2015/rs/src/seven.rs)2
-rw-r--r--2015/rs/code/six/Cargo.toml8
-rw-r--r--2015/rs/code/six/src/input.txt (renamed from 2015/rs/src/six.txt)0
-rw-r--r--2015/rs/code/six/src/main.rs (renamed from 2015/rs/src/six.rs)2
-rw-r--r--2015/rs/code/three/Cargo.toml8
-rw-r--r--2015/rs/code/three/src/input.txt (renamed from 2015/rs/src/three.txt)0
-rw-r--r--2015/rs/code/three/src/main.rs (renamed from 2015/rs/src/three.rs)2
-rw-r--r--2015/rs/code/two/Cargo.toml8
-rw-r--r--2015/rs/code/two/src/input.txt (renamed from 2015/rs/src/two.txt)0
-rw-r--r--2015/rs/code/two/src/main.rs (renamed from 2015/rs/src/two.rs)2
-rw-r--r--2015/rs/src/base.rs5
29 files changed, 120 insertions, 60 deletions
diff --git a/2015/rs/Cargo.lock b/2015/rs/Cargo.lock
index fcc0eb5..5f198ba 100644
--- a/2015/rs/Cargo.lock
+++ b/2015/rs/Cargo.lock
@@ -38,6 +38,21 @@ dependencies = [
]
[[package]]
+name = "eight"
+version = "0.1.0"
+
+[[package]]
+name = "five"
+version = "0.1.0"
+
+[[package]]
+name = "four"
+version = "0.1.0"
+dependencies = [
+ "md-5",
+]
+
+[[package]]
name = "generic-array"
version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -58,11 +73,28 @@ dependencies = [
]
[[package]]
-name = "rs"
+name = "nine"
+version = "0.1.0"
+
+[[package]]
+name = "one"
+version = "0.1.0"
+
+[[package]]
+name = "seven"
+version = "0.1.0"
+
+[[package]]
+name = "six"
+version = "0.1.0"
+
+[[package]]
+name = "three"
+version = "0.1.0"
+
+[[package]]
+name = "two"
version = "0.1.0"
-dependencies = [
- "md-5",
-]
[[package]]
name = "typenum"
diff --git a/2015/rs/Cargo.toml b/2015/rs/Cargo.toml
index e35c00b..943e005 100644
--- a/2015/rs/Cargo.toml
+++ b/2015/rs/Cargo.toml
@@ -1,43 +1,3 @@
-[package]
-name = "rs"
-version = "0.1.0"
-edition = "2021"
-
-[[bin]]
-name = "one"
-path = "src/one.rs"
-
-[[bin]]
-name = "two"
-path = "src/two.rs"
-
-[[bin]]
-name = "three"
-path = "src/three.rs"
-
-[[bin]]
-name = "four"
-path = "src/four.rs"
-
-[[bin]]
-name = "five"
-path = "src/five.rs"
-
-[[bin]]
-name = "six"
-path = "src/six.rs"
-
-[[bin]]
-name = "seven"
-path = "src/seven.rs"
-
-[[bin]]
-name = "eight"
-path = "src/eight.rs"
-
-[[bin]]
-name = "nine"
-path = "src/nine.rs"
-
-[dependencies]
-md-5 = "0.10.6"
+[workspace]
+members = ["code/*"]
+resolver = "2"
diff --git a/2015/rs/code/eight/Cargo.toml b/2015/rs/code/eight/Cargo.toml
new file mode 100644
index 0000000..3000071
--- /dev/null
+++ b/2015/rs/code/eight/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "eight"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
diff --git a/2015/rs/src/eight.txt b/2015/rs/code/eight/src/input.txt
index 0e80d0f..0e80d0f 100644
--- a/2015/rs/src/eight.txt
+++ b/2015/rs/code/eight/src/input.txt
diff --git a/2015/rs/src/eight.rs b/2015/rs/code/eight/src/main.rs
index ce9a8a7..b51f436 100644
--- a/2015/rs/src/eight.rs
+++ b/2015/rs/code/eight/src/main.rs
@@ -1,4 +1,4 @@
-static INPUT: &'static str = include_str!("eight.txt");
+static INPUT: &'static str = include_str!("input.txt");
#[derive(Copy, Clone)]
enum ParseState {
diff --git a/2015/rs/code/five/Cargo.toml b/2015/rs/code/five/Cargo.toml
new file mode 100644
index 0000000..7100f84
--- /dev/null
+++ b/2015/rs/code/five/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "five"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
diff --git a/2015/rs/src/five.txt b/2015/rs/code/five/src/input.txt
index a9b6e77..a9b6e77 100644
--- a/2015/rs/src/five.txt
+++ b/2015/rs/code/five/src/input.txt
diff --git a/2015/rs/src/five.rs b/2015/rs/code/five/src/main.rs
index 804d38b..eeafd42 100644
--- a/2015/rs/src/five.rs
+++ b/2015/rs/code/five/src/main.rs
@@ -1,4 +1,4 @@
-static INPUT: &'static str = include_str!("five.txt");
+static INPUT: &'static str = include_str!("input.txt");
fn main() {
let valueified = INPUT.split('\n').filter(|s| !s.is_empty());
diff --git a/2015/rs/code/four/Cargo.toml b/2015/rs/code/four/Cargo.toml
new file mode 100644
index 0000000..ab76142
--- /dev/null
+++ b/2015/rs/code/four/Cargo.toml
@@ -0,0 +1,9 @@
+[package]
+name = "four"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
+md-5 = "0.10.6"
diff --git a/2015/rs/src/four.rs b/2015/rs/code/four/src/main.rs
index 177ddc5..177ddc5 100644
--- a/2015/rs/src/four.rs
+++ b/2015/rs/code/four/src/main.rs
diff --git a/2015/rs/code/nine/Cargo.toml b/2015/rs/code/nine/Cargo.toml
new file mode 100644
index 0000000..4782be7
--- /dev/null
+++ b/2015/rs/code/nine/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "nine"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
diff --git a/2015/rs/src/nine.txt b/2015/rs/code/nine/src/input.txt
index 97a6b63..97a6b63 100644
--- a/2015/rs/src/nine.txt
+++ b/2015/rs/code/nine/src/input.txt
diff --git a/2015/rs/src/nine.rs b/2015/rs/code/nine/src/main.rs
index bc716c2..46116e0 100644
--- a/2015/rs/src/nine.rs
+++ b/2015/rs/code/nine/src/main.rs
@@ -3,7 +3,7 @@
use std::collections::{HashSet, HashMap};
use std::io::Write;
-static INPUT: &'static str = include_str!("nine.txt");
+static INPUT: &'static str = include_str!("input.txt");
fn main() {
let valueified = INPUT.split('\n').filter(|s| !s.is_empty())
diff --git a/2015/rs/code/one/Cargo.toml b/2015/rs/code/one/Cargo.toml
new file mode 100644
index 0000000..dcf4350
--- /dev/null
+++ b/2015/rs/code/one/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "one"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
diff --git a/2015/rs/src/one.txt b/2015/rs/code/one/src/input.txt
index 2d4ad8f..2d4ad8f 100644
--- a/2015/rs/src/one.txt
+++ b/2015/rs/code/one/src/input.txt
diff --git a/2015/rs/src/one.rs b/2015/rs/code/one/src/main.rs
index c23c1bd..d9e16e1 100644
--- a/2015/rs/src/one.rs
+++ b/2015/rs/code/one/src/main.rs
@@ -1,4 +1,4 @@
-static INPUT: &'static str = include_str!("one.txt");
+static INPUT: &'static str = include_str!("input.txt");
fn main() {
let valueified = INPUT.chars().map(|c| match c { '(' => 1, ')' => -1, _ => 0});
diff --git a/2015/rs/code/seven/Cargo.toml b/2015/rs/code/seven/Cargo.toml
new file mode 100644
index 0000000..152108e
--- /dev/null
+++ b/2015/rs/code/seven/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "seven"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
diff --git a/2015/rs/src/seven.txt b/2015/rs/code/seven/src/input.txt
index 56cae92..56cae92 100644
--- a/2015/rs/src/seven.txt
+++ b/2015/rs/code/seven/src/input.txt
diff --git a/2015/rs/src/seven.rs b/2015/rs/code/seven/src/main.rs
index 7d44f0e..ec2c316 100644
--- a/2015/rs/src/seven.rs
+++ b/2015/rs/code/seven/src/main.rs
@@ -1,6 +1,6 @@
use std::collections::HashMap;
-static INPUT: &[u8] = include_bytes!("seven.txt");
+static INPUT: &[u8] = include_bytes!("input.txt");
#[derive(Debug, Copy, Clone)]
enum WireOrLiteral {
diff --git a/2015/rs/code/six/Cargo.toml b/2015/rs/code/six/Cargo.toml
new file mode 100644
index 0000000..8413a35
--- /dev/null
+++ b/2015/rs/code/six/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "six"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
diff --git a/2015/rs/src/six.txt b/2015/rs/code/six/src/input.txt
index c4357c6..c4357c6 100644
--- a/2015/rs/src/six.txt
+++ b/2015/rs/code/six/src/input.txt
diff --git a/2015/rs/src/six.rs b/2015/rs/code/six/src/main.rs
index 0fe0d2d..6342cd9 100644
--- a/2015/rs/src/six.rs
+++ b/2015/rs/code/six/src/main.rs
@@ -1,4 +1,4 @@
-static INPUT: &'static str = include_str!("six.txt");
+static INPUT: &'static str = include_str!("input.txt");
#[derive(Debug)]
enum LightCommand {
diff --git a/2015/rs/code/three/Cargo.toml b/2015/rs/code/three/Cargo.toml
new file mode 100644
index 0000000..6c6d234
--- /dev/null
+++ b/2015/rs/code/three/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "three"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
diff --git a/2015/rs/src/three.txt b/2015/rs/code/three/src/input.txt
index 55f286f..55f286f 100644
--- a/2015/rs/src/three.txt
+++ b/2015/rs/code/three/src/input.txt
diff --git a/2015/rs/src/three.rs b/2015/rs/code/three/src/main.rs
index 04db03a..770fc10 100644
--- a/2015/rs/src/three.rs
+++ b/2015/rs/code/three/src/main.rs
@@ -1,6 +1,6 @@
use std::collections::HashSet;
-static INPUT: &'static str = include_str!("three.txt");
+static INPUT: &'static str = include_str!("input.txt");
fn main() {
let valueified = INPUT.chars().map(|c| match c { '<' => (-1, 0), '>' => (1, 0), '^' => (0, 1), 'v' => (0, -1), _ => (0, 0) });
diff --git a/2015/rs/code/two/Cargo.toml b/2015/rs/code/two/Cargo.toml
new file mode 100644
index 0000000..40b395d
--- /dev/null
+++ b/2015/rs/code/two/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "two"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
diff --git a/2015/rs/src/two.txt b/2015/rs/code/two/src/input.txt
index 5f3335f..5f3335f 100644
--- a/2015/rs/src/two.txt
+++ b/2015/rs/code/two/src/input.txt
diff --git a/2015/rs/src/two.rs b/2015/rs/code/two/src/main.rs
index 572c556..2185bae 100644
--- a/2015/rs/src/two.rs
+++ b/2015/rs/code/two/src/main.rs
@@ -1,4 +1,4 @@
-static INPUT: &'static str = include_str!("two.txt");
+static INPUT: &'static str = include_str!("input.txt");
fn main() {
let valueified = INPUT
diff --git a/2015/rs/src/base.rs b/2015/rs/src/base.rs
deleted file mode 100644
index 44099ac..0000000
--- a/2015/rs/src/base.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-static INPUT: &'static str = include_str!("!!.txt");
-
-fn main() {
- let valueified = INPUT;
-}