summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2024-04-20 14:36:37 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2024-04-20 14:38:17 +0200
commitc6ffec49cdd92ef73c098e3ff7a0ca334f78f67d (patch)
treef7399279eaa3f2f798e354e38f737c100affb745
parent71763deb61745972f2fc700ca7264c99e2838754 (diff)
downloadrebel-c6ffec49cdd92ef73c098e3ff7a0ca334f78f67d.tar
rebel-c6ffec49cdd92ef73c098e3ff7a0ca334f78f67d.zip
rebel: move parsing to a separate crate
-rw-r--r--Cargo.lock9
-rw-r--r--crates/rebel-parse/Cargo.toml11
-rw-r--r--crates/rebel-parse/src/lib.rs (renamed from crates/rebel/src/parse.rs)0
-rw-r--r--crates/rebel/Cargo.toml2
-rw-r--r--crates/rebel/src/context.rs2
-rw-r--r--crates/rebel/src/main.rs1
6 files changed, 21 insertions, 4 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 6a6062c..fc2c1b2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -489,8 +489,8 @@ dependencies = [
"indoc",
"lazy_static",
"nix",
- "peg",
"rebel-common",
+ "rebel-parse",
"rebel-runner",
"scoped-tls-hkt",
"serde",
@@ -507,6 +507,13 @@ dependencies = [
]
[[package]]
+name = "rebel-parse"
+version = "0.1.0"
+dependencies = [
+ "peg",
+]
+
+[[package]]
name = "rebel-runner"
version = "0.1.0"
dependencies = [
diff --git a/crates/rebel-parse/Cargo.toml b/crates/rebel-parse/Cargo.toml
new file mode 100644
index 0000000..29dc1ed
--- /dev/null
+++ b/crates/rebel-parse/Cargo.toml
@@ -0,0 +1,11 @@
+[package]
+name = "rebel-parse"
+version = "0.1.0"
+authors = ["Matthias Schiffer <mschiffer@universe-factory.net>"]
+license = "MIT"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
+peg = "0.8.2"
diff --git a/crates/rebel/src/parse.rs b/crates/rebel-parse/src/lib.rs
index 5857efb..5857efb 100644
--- a/crates/rebel/src/parse.rs
+++ b/crates/rebel-parse/src/lib.rs
diff --git a/crates/rebel/Cargo.toml b/crates/rebel/Cargo.toml
index 9d5c498..9f229c8 100644
--- a/crates/rebel/Cargo.toml
+++ b/crates/rebel/Cargo.toml
@@ -9,6 +9,7 @@ edition = "2021"
[dependencies]
rebel-common = { path = "../rebel-common" }
+rebel-parse = { path = "../rebel-parse" }
rebel-runner = { path = "../rebel-runner" }
clap = { version = "4.0.0", features = ["derive"] }
@@ -22,4 +23,3 @@ scoped-tls-hkt = "0.1.2"
serde = { version = "1", features = ["derive", "rc"] }
serde_yaml = "0.9"
walkdir = "2"
-peg = "0.8.2"
diff --git a/crates/rebel/src/context.rs b/crates/rebel/src/context.rs
index 084facd..fa24399 100644
--- a/crates/rebel/src/context.rs
+++ b/crates/rebel/src/context.rs
@@ -14,10 +14,10 @@ use rebel_common::{
string_hash::ArchiveHash,
types::TaskID,
};
+use rebel_parse::{self as parse, TaskFlags};
use crate::{
args::*,
- parse::{self, TaskFlags},
paths,
pin::{self, Pins},
task::*,
diff --git a/crates/rebel/src/main.rs b/crates/rebel/src/main.rs
index 54ea1cf..76b4551 100644
--- a/crates/rebel/src/main.rs
+++ b/crates/rebel/src/main.rs
@@ -1,7 +1,6 @@
mod args;
mod context;
mod driver;
-mod parse;
mod paths;
mod pin;
mod recipe;