diff --git a/Cargo.lock b/Cargo.lock index 470b811..0cadc95 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -989,7 +989,7 @@ dependencies = [ ] [[package]] -name = "paladin" +name = "paladin-core" version = "0.1.0" dependencies = [ "anyhow", @@ -1000,7 +1000,7 @@ dependencies = [ "futures", "lapin", "num-traits", - "paladin-opkind-derive", + "paladin-opkind-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pin-project", "serde", "tokio", @@ -1020,6 +1020,16 @@ dependencies = [ "syn", ] +[[package]] +name = "paladin-opkind-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52db5917dc6613839e99f55194fa6049b919906aad4a558076864fb6d524315b" +dependencies = [ + "quote", + "syn", +] + [[package]] name = "parking" version = "2.1.1" diff --git a/Cargo.toml b/Cargo.toml index 564037e..fc1531c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["paladin", "paladin-opkind-derive"] +members = ["paladin-core", "paladin-opkind-derive"] resolver = "2" [workspace.package] diff --git a/examples/hello-world-rabbitmq/Cargo.lock b/examples/hello-world-rabbitmq/Cargo.lock index 59ff43f..db0187c 100644 --- a/examples/hello-world-rabbitmq/Cargo.lock +++ b/examples/hello-world-rabbitmq/Cargo.lock @@ -845,7 +845,7 @@ dependencies = [ "dotenvy", "futures", "ops", - "paladin", + "paladin-core", "tokio", "tracing", "tracing-subscriber", @@ -971,14 +971,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "opkind_derive" -version = "0.1.0" -dependencies = [ - "quote", - "syn", -] - [[package]] name = "ops" version = "0.1.0" @@ -986,7 +978,7 @@ dependencies = [ "anyhow", "async-trait", "futures", - "paladin", + "paladin-core", "serde", ] @@ -1014,7 +1006,7 @@ dependencies = [ ] [[package]] -name = "paladin" +name = "paladin-core" version = "0.1.0" dependencies = [ "anyhow", @@ -1024,7 +1016,7 @@ dependencies = [ "dotenvy", "futures", "lapin", - "opkind_derive", + "paladin-opkind-derive", "pin-project", "serde", "tokio", @@ -1036,6 +1028,16 @@ dependencies = [ "uuid", ] +[[package]] +name = "paladin-opkind-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52db5917dc6613839e99f55194fa6049b919906aad4a558076864fb6d524315b" +dependencies = [ + "quote", + "syn", +] + [[package]] name = "parking" version = "2.1.1" @@ -1969,7 +1971,7 @@ dependencies = [ "dotenvy", "futures", "ops", - "paladin", + "paladin-core", "tokio", "tracing", "tracing-subscriber", diff --git a/examples/hello-world-rabbitmq/leader.Dockerfile b/examples/hello-world-rabbitmq/leader.Dockerfile index 0da8f9c..cead6bc 100644 --- a/examples/hello-world-rabbitmq/leader.Dockerfile +++ b/examples/hello-world-rabbitmq/leader.Dockerfile @@ -2,28 +2,28 @@ FROM rust:slim-bullseye as builder RUN \ mkdir -p paladin-opkind-derive/src && touch paladin-opkind-derive/src/lib.rs && \ - mkdir -p paladin/src && touch paladin/src/lib.rs && \ - mkdir -p ops/src && touch ops/src/lib.rs && \ - mkdir -p leader/src && echo "fn main() {println!(\"YO!\");}" > leader/src/main.rs + mkdir -p paladin-core/src && touch paladin-core/src/lib.rs && \ + mkdir -p ops/src && touch ops/src/lib.rs && \ + mkdir -p leader/src && echo "fn main() {println!(\"YO!\");}" > leader/src/main.rs COPY Cargo.toml . -RUN sed -i "2s/.*/members = [\"paladin\", \"paladin-opkind-derive\", \"ops\", \"leader\"]/" Cargo.toml +RUN sed -i "2s/.*/members = [\"paladin-core\", \"paladin-opkind-derive\", \"ops\", \"leader\"]/" Cargo.toml COPY Cargo.lock . COPY paladin-opkind-derive/Cargo.toml ./paladin-opkind-derive/Cargo.toml -COPY paladin/Cargo.toml ./paladin/Cargo.toml +COPY paladin-core/Cargo.toml ./paladin-core/Cargo.toml COPY examples/hello-world-rabbitmq/ops/Cargo.toml ./ops/Cargo.toml COPY examples/hello-world-rabbitmq/leader/Cargo.toml ./leader/Cargo.toml RUN cargo build --release --bin leader COPY paladin-opkind-derive ./paladin-opkind-derive -COPY paladin ./paladin +COPY paladin-core ./paladin-core COPY examples/hello-world-rabbitmq/ops ./ops COPY examples/hello-world-rabbitmq/leader ./leader RUN \ touch paladin-opkind-derive/src/lib.rs && \ - touch paladin/src/lib.rs && \ + touch paladin-core/src/lib.rs && \ touch ops/src/lib.rs && \ touch leader/src/main.rs diff --git a/examples/hello-world-rabbitmq/leader/Cargo.toml b/examples/hello-world-rabbitmq/leader/Cargo.toml index 4078b53..3f0c5fb 100644 --- a/examples/hello-world-rabbitmq/leader/Cargo.toml +++ b/examples/hello-world-rabbitmq/leader/Cargo.toml @@ -14,5 +14,5 @@ tokio = { version = "1.32.0", features = ["full"] } futures = "0.3.28" clap = { version = "4.4.2", features = ["derive", "env"] } -paladin = { path = "../../../paladin" } +paladin-core = { path = "../../../paladin-core" } ops = { path = "../ops" } diff --git a/examples/hello-world-rabbitmq/ops/Cargo.toml b/examples/hello-world-rabbitmq/ops/Cargo.toml index aecb213..3cee420 100644 --- a/examples/hello-world-rabbitmq/ops/Cargo.toml +++ b/examples/hello-world-rabbitmq/ops/Cargo.toml @@ -11,4 +11,4 @@ anyhow = "1.0.75" futures = "0.3.28" async-trait = "0.1.73" -paladin = { path = "../../../paladin" } +paladin-core = { path = "../../../paladin-core" } diff --git a/examples/hello-world-rabbitmq/worker.Dockerfile b/examples/hello-world-rabbitmq/worker.Dockerfile index 5a3993c..2ff324f 100644 --- a/examples/hello-world-rabbitmq/worker.Dockerfile +++ b/examples/hello-world-rabbitmq/worker.Dockerfile @@ -2,28 +2,28 @@ FROM rust:slim-bullseye as builder RUN \ mkdir -p paladin-opkind-derive/src && touch paladin-opkind-derive/src/lib.rs && \ - mkdir -p paladin/src && touch paladin/src/lib.rs && \ - mkdir -p ops/src && touch ops/src/lib.rs && \ - mkdir -p worker/src && echo "fn main() {}" > worker/src/main.rs + mkdir -p paladin-core/src && touch paladin-core/src/lib.rs && \ + mkdir -p ops/src && touch ops/src/lib.rs && \ + mkdir -p worker/src && echo "fn main() {}" > worker/src/main.rs COPY Cargo.toml . -RUN sed -i "2s/.*/members = [\"paladin\", \"paladin-opkind-derive\", \"ops\", \"worker\"]/" Cargo.toml +RUN sed -i "2s/.*/members = [\"paladin-core\", \"paladin-opkind-derive\", \"ops\", \"worker\"]/" Cargo.toml COPY Cargo.lock . COPY paladin-opkind-derive/Cargo.toml ./paladin-opkind-derive/Cargo.toml -COPY paladin/Cargo.toml ./paladin/Cargo.toml +COPY paladin-core/Cargo.toml ./paladin-core/Cargo.toml COPY examples/hello-world-rabbitmq/ops/Cargo.toml ./ops/Cargo.toml COPY examples/hello-world-rabbitmq/worker/Cargo.toml ./worker/Cargo.toml RUN cargo build --release --bin worker COPY paladin-opkind-derive ./paladin-opkind-derive -COPY paladin ./paladin +COPY paladin-core ./paladin-core COPY examples/hello-world-rabbitmq/ops ./ops COPY examples/hello-world-rabbitmq/worker ./worker RUN \ touch paladin-opkind-derive/src/lib.rs && \ - touch paladin/src/lib.rs && \ + touch paladin-core/src/lib.rs && \ touch ops/src/lib.rs && \ touch worker/src/main.rs diff --git a/examples/hello-world-rabbitmq/worker/Cargo.toml b/examples/hello-world-rabbitmq/worker/Cargo.toml index d1ef8a3..bac682c 100644 --- a/examples/hello-world-rabbitmq/worker/Cargo.toml +++ b/examples/hello-world-rabbitmq/worker/Cargo.toml @@ -14,5 +14,5 @@ tokio = { version = "1.32.0", features = ["full"] } futures = "0.3.28" clap = { version = "4.4.2", features = ["derive", "env"] } -paladin = { path = "../../../paladin" } +paladin-core = { path = "../../../paladin-core" } ops = { path = "../ops" } diff --git a/paladin/Cargo.toml b/paladin-core/Cargo.toml similarity index 86% rename from paladin/Cargo.toml rename to paladin-core/Cargo.toml index dc645d1..36603a0 100644 --- a/paladin/Cargo.toml +++ b/paladin-core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "paladin" +name = "paladin-core" version = "0.1.0" description = "A Rust distributed algorithm toolkit. Write distributed algorithms without the complexities of distributed systems programming." license.workspace = true @@ -9,7 +9,8 @@ repository.workspace = true keywords.workspace = true categories.workspace = true -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[lib] +name = "paladin" [dependencies] anyhow = { version = "1.0.75", features = ["backtrace"] } @@ -28,7 +29,7 @@ futures = "0.3.28" uuid = { version = "1.4.1", features = ["v4", "fast-rng"] } clap = { version = "4.4.2", features = ["derive", "env"] } pin-project = "1.1.3" -paladin-opkind-derive = { path = "../paladin-opkind-derive" } +paladin-opkind-derive = "0.1.0" [dev-dependencies] # Required for certain doc tests which showcase generic numeric operations diff --git a/paladin/src/acker.rs b/paladin-core/src/acker.rs similarity index 100% rename from paladin/src/acker.rs rename to paladin-core/src/acker.rs diff --git a/paladin/src/channel/coordinated_channel/coordinated_sink.rs b/paladin-core/src/channel/coordinated_channel/coordinated_sink.rs similarity index 100% rename from paladin/src/channel/coordinated_channel/coordinated_sink.rs rename to paladin-core/src/channel/coordinated_channel/coordinated_sink.rs diff --git a/paladin/src/channel/coordinated_channel/coordinated_stream.rs b/paladin-core/src/channel/coordinated_channel/coordinated_stream.rs similarity index 100% rename from paladin/src/channel/coordinated_channel/coordinated_stream.rs rename to paladin-core/src/channel/coordinated_channel/coordinated_stream.rs diff --git a/paladin/src/channel/coordinated_channel/mod.rs b/paladin-core/src/channel/coordinated_channel/mod.rs similarity index 100% rename from paladin/src/channel/coordinated_channel/mod.rs rename to paladin-core/src/channel/coordinated_channel/mod.rs diff --git a/paladin/src/channel/mod.rs b/paladin-core/src/channel/mod.rs similarity index 100% rename from paladin/src/channel/mod.rs rename to paladin-core/src/channel/mod.rs diff --git a/paladin/src/channel/queue.rs b/paladin-core/src/channel/queue.rs similarity index 100% rename from paladin/src/channel/queue.rs rename to paladin-core/src/channel/queue.rs diff --git a/paladin/src/config/mod.rs b/paladin-core/src/config/mod.rs similarity index 100% rename from paladin/src/config/mod.rs rename to paladin-core/src/config/mod.rs diff --git a/paladin/src/contiguous/mod.rs b/paladin-core/src/contiguous/mod.rs similarity index 100% rename from paladin/src/contiguous/mod.rs rename to paladin-core/src/contiguous/mod.rs diff --git a/paladin/src/contiguous/queue.rs b/paladin-core/src/contiguous/queue.rs similarity index 100% rename from paladin/src/contiguous/queue.rs rename to paladin-core/src/contiguous/queue.rs diff --git a/paladin/src/directive/indexed_stream/foldable.rs b/paladin-core/src/directive/indexed_stream/foldable.rs similarity index 100% rename from paladin/src/directive/indexed_stream/foldable.rs rename to paladin-core/src/directive/indexed_stream/foldable.rs diff --git a/paladin/src/directive/indexed_stream/functor.rs b/paladin-core/src/directive/indexed_stream/functor.rs similarity index 100% rename from paladin/src/directive/indexed_stream/functor.rs rename to paladin-core/src/directive/indexed_stream/functor.rs diff --git a/paladin/src/directive/indexed_stream/mod.rs b/paladin-core/src/directive/indexed_stream/mod.rs similarity index 100% rename from paladin/src/directive/indexed_stream/mod.rs rename to paladin-core/src/directive/indexed_stream/mod.rs diff --git a/paladin/src/directive/mod.rs b/paladin-core/src/directive/mod.rs similarity index 100% rename from paladin/src/directive/mod.rs rename to paladin-core/src/directive/mod.rs diff --git a/paladin/src/lib.rs b/paladin-core/src/lib.rs similarity index 100% rename from paladin/src/lib.rs rename to paladin-core/src/lib.rs diff --git a/paladin/src/operation/mod.rs b/paladin-core/src/operation/mod.rs similarity index 100% rename from paladin/src/operation/mod.rs rename to paladin-core/src/operation/mod.rs diff --git a/paladin/src/queue/amqp.rs b/paladin-core/src/queue/amqp.rs similarity index 100% rename from paladin/src/queue/amqp.rs rename to paladin-core/src/queue/amqp.rs diff --git a/paladin/src/queue/in_memory.rs b/paladin-core/src/queue/in_memory.rs similarity index 100% rename from paladin/src/queue/in_memory.rs rename to paladin-core/src/queue/in_memory.rs diff --git a/paladin/src/queue/mod.rs b/paladin-core/src/queue/mod.rs similarity index 100% rename from paladin/src/queue/mod.rs rename to paladin-core/src/queue/mod.rs diff --git a/paladin/src/queue/sink.rs b/paladin-core/src/queue/sink.rs similarity index 100% rename from paladin/src/queue/sink.rs rename to paladin-core/src/queue/sink.rs diff --git a/paladin/src/runtime/dynamic_channel.rs b/paladin-core/src/runtime/dynamic_channel.rs similarity index 100% rename from paladin/src/runtime/dynamic_channel.rs rename to paladin-core/src/runtime/dynamic_channel.rs diff --git a/paladin/src/runtime/mod.rs b/paladin-core/src/runtime/mod.rs similarity index 100% rename from paladin/src/runtime/mod.rs rename to paladin-core/src/runtime/mod.rs diff --git a/paladin/src/serializer/mod.rs b/paladin-core/src/serializer/mod.rs similarity index 100% rename from paladin/src/serializer/mod.rs rename to paladin-core/src/serializer/mod.rs diff --git a/paladin/src/task/mod.rs b/paladin-core/src/task/mod.rs similarity index 100% rename from paladin/src/task/mod.rs rename to paladin-core/src/task/mod.rs