From 4c490b9dce4626b26b1269a0697705e6bf54e9bf Mon Sep 17 00:00:00 2001 From: chesedo Date: Wed, 26 Oct 2022 09:07:15 +0200 Subject: [PATCH 1/4] refactor: rename plugins to runtimes --- Cargo.toml | 4 ++-- {plugins => runtimes}/Cargo.toml | 0 {plugins => runtimes}/serenity/Makefile | 0 {plugins => runtimes}/serenity/runtime/Cargo.toml | 0 {plugins => runtimes}/serenity/runtime/README.md | 0 {plugins => runtimes}/serenity/runtime/src/lib.rs | 0 {plugins => runtimes}/serenity/runtime/src/main.rs | 0 {plugins => runtimes}/serenity/wasm/Cargo.toml | 0 {plugins => runtimes}/serenity/wasm/src/lib.rs | 0 9 files changed, 2 insertions(+), 2 deletions(-) rename {plugins => runtimes}/Cargo.toml (100%) rename {plugins => runtimes}/serenity/Makefile (100%) rename {plugins => runtimes}/serenity/runtime/Cargo.toml (100%) rename {plugins => runtimes}/serenity/runtime/README.md (100%) rename {plugins => runtimes}/serenity/runtime/src/lib.rs (100%) rename {plugins => runtimes}/serenity/runtime/src/main.rs (100%) rename {plugins => runtimes}/serenity/wasm/Cargo.toml (100%) rename {plugins => runtimes}/serenity/wasm/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 2362b2f89..242c6b9d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,9 +13,9 @@ members = [ exclude = [ "e2e", "examples", - "plugins", "resources/aws-rds", "resources/persist", "resources/secrets", - "resources/shared-db" + "resources/shared-db", + "runtimes" ] diff --git a/plugins/Cargo.toml b/runtimes/Cargo.toml similarity index 100% rename from plugins/Cargo.toml rename to runtimes/Cargo.toml diff --git a/plugins/serenity/Makefile b/runtimes/serenity/Makefile similarity index 100% rename from plugins/serenity/Makefile rename to runtimes/serenity/Makefile diff --git a/plugins/serenity/runtime/Cargo.toml b/runtimes/serenity/runtime/Cargo.toml similarity index 100% rename from plugins/serenity/runtime/Cargo.toml rename to runtimes/serenity/runtime/Cargo.toml diff --git a/plugins/serenity/runtime/README.md b/runtimes/serenity/runtime/README.md similarity index 100% rename from plugins/serenity/runtime/README.md rename to runtimes/serenity/runtime/README.md diff --git a/plugins/serenity/runtime/src/lib.rs b/runtimes/serenity/runtime/src/lib.rs similarity index 100% rename from plugins/serenity/runtime/src/lib.rs rename to runtimes/serenity/runtime/src/lib.rs diff --git a/plugins/serenity/runtime/src/main.rs b/runtimes/serenity/runtime/src/main.rs similarity index 100% rename from plugins/serenity/runtime/src/main.rs rename to runtimes/serenity/runtime/src/main.rs diff --git a/plugins/serenity/wasm/Cargo.toml b/runtimes/serenity/wasm/Cargo.toml similarity index 100% rename from plugins/serenity/wasm/Cargo.toml rename to runtimes/serenity/wasm/Cargo.toml diff --git a/plugins/serenity/wasm/src/lib.rs b/runtimes/serenity/wasm/src/lib.rs similarity index 100% rename from plugins/serenity/wasm/src/lib.rs rename to runtimes/serenity/wasm/src/lib.rs From dfcb9f309860df84d169b212ada10708f4b0797e Mon Sep 17 00:00:00 2001 From: chesedo Date: Wed, 26 Oct 2022 09:09:58 +0200 Subject: [PATCH 2/4] refactor: drop serenity folder --- runtimes/Cargo.toml | 4 ++-- runtimes/{serenity => }/Makefile | 2 +- runtimes/{serenity => }/runtime/Cargo.toml | 0 runtimes/{serenity => }/runtime/README.md | 0 runtimes/{serenity => }/runtime/src/lib.rs | 0 runtimes/{serenity => }/runtime/src/main.rs | 0 runtimes/{serenity => }/wasm/Cargo.toml | 0 runtimes/{serenity => }/wasm/src/lib.rs | 0 8 files changed, 3 insertions(+), 3 deletions(-) rename runtimes/{serenity => }/Makefile (71%) rename runtimes/{serenity => }/runtime/Cargo.toml (100%) rename runtimes/{serenity => }/runtime/README.md (100%) rename runtimes/{serenity => }/runtime/src/lib.rs (100%) rename runtimes/{serenity => }/runtime/src/main.rs (100%) rename runtimes/{serenity => }/wasm/Cargo.toml (100%) rename runtimes/{serenity => }/wasm/src/lib.rs (100%) diff --git a/runtimes/Cargo.toml b/runtimes/Cargo.toml index 76beb549a..fc0a47f8b 100644 --- a/runtimes/Cargo.toml +++ b/runtimes/Cargo.toml @@ -1,5 +1,5 @@ [workspace] members = [ - "serenity/wasm", - "serenity/runtime" + "wasm", + "runtime" ] diff --git a/runtimes/serenity/Makefile b/runtimes/Makefile similarity index 71% rename from runtimes/serenity/Makefile rename to runtimes/Makefile index 5fd5bade8..759c28dbb 100644 --- a/runtimes/serenity/Makefile +++ b/runtimes/Makefile @@ -4,7 +4,7 @@ all: wasm runtime wasm: cd wasm; cargo build --target wasm32-wasi - cp ../target/wasm32-wasi/debug/shuttle_serenity.wasm runtime/bot.wasm + cp target/wasm32-wasi/debug/shuttle_serenity.wasm runtime/bot.wasm test: wasm cd runtime; cargo test -- --nocapture diff --git a/runtimes/serenity/runtime/Cargo.toml b/runtimes/runtime/Cargo.toml similarity index 100% rename from runtimes/serenity/runtime/Cargo.toml rename to runtimes/runtime/Cargo.toml diff --git a/runtimes/serenity/runtime/README.md b/runtimes/runtime/README.md similarity index 100% rename from runtimes/serenity/runtime/README.md rename to runtimes/runtime/README.md diff --git a/runtimes/serenity/runtime/src/lib.rs b/runtimes/runtime/src/lib.rs similarity index 100% rename from runtimes/serenity/runtime/src/lib.rs rename to runtimes/runtime/src/lib.rs diff --git a/runtimes/serenity/runtime/src/main.rs b/runtimes/runtime/src/main.rs similarity index 100% rename from runtimes/serenity/runtime/src/main.rs rename to runtimes/runtime/src/main.rs diff --git a/runtimes/serenity/wasm/Cargo.toml b/runtimes/wasm/Cargo.toml similarity index 100% rename from runtimes/serenity/wasm/Cargo.toml rename to runtimes/wasm/Cargo.toml diff --git a/runtimes/serenity/wasm/src/lib.rs b/runtimes/wasm/src/lib.rs similarity index 100% rename from runtimes/serenity/wasm/src/lib.rs rename to runtimes/wasm/src/lib.rs From 47a698926c1e6303e0528d07ab235f06b3b6f97c Mon Sep 17 00:00:00 2001 From: chesedo Date: Wed, 26 Oct 2022 09:13:12 +0200 Subject: [PATCH 3/4] refactor: rename runtime to shuttle-next --- runtimes/Cargo.toml | 4 ++-- runtimes/Makefile | 12 ++++++------ runtimes/{runtime => next}/Cargo.toml | 2 +- runtimes/{runtime => next}/README.md | 2 +- runtimes/{runtime => next}/src/lib.rs | 0 runtimes/{runtime => next}/src/main.rs | 0 6 files changed, 10 insertions(+), 10 deletions(-) rename runtimes/{runtime => next}/Cargo.toml (94%) rename runtimes/{runtime => next}/README.md (88%) rename runtimes/{runtime => next}/src/lib.rs (100%) rename runtimes/{runtime => next}/src/main.rs (100%) diff --git a/runtimes/Cargo.toml b/runtimes/Cargo.toml index fc0a47f8b..ef3882ec9 100644 --- a/runtimes/Cargo.toml +++ b/runtimes/Cargo.toml @@ -1,5 +1,5 @@ [workspace] members = [ - "wasm", - "runtime" + "next", + "wasm" ] diff --git a/runtimes/Makefile b/runtimes/Makefile index 759c28dbb..27b423cef 100644 --- a/runtimes/Makefile +++ b/runtimes/Makefile @@ -1,13 +1,13 @@ -.PHONY: wasm runtime +.PHONY: wasm next -all: wasm runtime +all: wasm next wasm: cd wasm; cargo build --target wasm32-wasi - cp target/wasm32-wasi/debug/shuttle_serenity.wasm runtime/bot.wasm + cp target/wasm32-wasi/debug/shuttle_serenity.wasm next/bot.wasm test: wasm - cd runtime; cargo test -- --nocapture + cd next; cargo test -- --nocapture -runtime: - cd runtime; cargo build +next: + cd next; cargo build diff --git a/runtimes/runtime/Cargo.toml b/runtimes/next/Cargo.toml similarity index 94% rename from runtimes/runtime/Cargo.toml rename to runtimes/next/Cargo.toml index a13f254ec..69e96b2fb 100644 --- a/runtimes/runtime/Cargo.toml +++ b/runtimes/next/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "shuttle-runtime" +name = "shuttle-next" version = "0.1.0" edition = "2021" diff --git a/runtimes/runtime/README.md b/runtimes/next/README.md similarity index 88% rename from runtimes/runtime/README.md rename to runtimes/next/README.md index 1bc6d03df..d0da79c83 100644 --- a/runtimes/runtime/README.md +++ b/runtimes/next/README.md @@ -1,4 +1,4 @@ -# `shuttle-runtime` +# `shuttle-next` ## How to run diff --git a/runtimes/runtime/src/lib.rs b/runtimes/next/src/lib.rs similarity index 100% rename from runtimes/runtime/src/lib.rs rename to runtimes/next/src/lib.rs diff --git a/runtimes/runtime/src/main.rs b/runtimes/next/src/main.rs similarity index 100% rename from runtimes/runtime/src/main.rs rename to runtimes/next/src/main.rs From c24b4eb958dc045cb4336ec15da431e16fe8453f Mon Sep 17 00:00:00 2001 From: chesedo Date: Wed, 26 Oct 2022 09:15:24 +0200 Subject: [PATCH 4/4] refactor: prepare shuttle-legacy runtime --- runtimes/Cargo.toml | 1 + runtimes/Makefile | 3 +++ {next => runtimes/legacy}/Cargo.toml | 2 +- {next => runtimes/legacy}/README.md | 2 +- {next => runtimes/legacy}/src/args.rs | 0 {next => runtimes/legacy}/src/error.rs | 0 {next => runtimes/legacy}/src/lib.rs | 0 {next => runtimes/legacy}/src/main.rs | 0 8 files changed, 6 insertions(+), 2 deletions(-) rename {next => runtimes/legacy}/Cargo.toml (96%) rename {next => runtimes/legacy}/README.md (87%) rename {next => runtimes/legacy}/src/args.rs (100%) rename {next => runtimes/legacy}/src/error.rs (100%) rename {next => runtimes/legacy}/src/lib.rs (100%) rename {next => runtimes/legacy}/src/main.rs (100%) diff --git a/runtimes/Cargo.toml b/runtimes/Cargo.toml index ef3882ec9..025d17a42 100644 --- a/runtimes/Cargo.toml +++ b/runtimes/Cargo.toml @@ -1,5 +1,6 @@ [workspace] members = [ + "legacy", "next", "wasm" ] diff --git a/runtimes/Makefile b/runtimes/Makefile index 27b423cef..8bca54cab 100644 --- a/runtimes/Makefile +++ b/runtimes/Makefile @@ -11,3 +11,6 @@ test: wasm next: cd next; cargo build + +legacy: + cd legacy; cargo build diff --git a/next/Cargo.toml b/runtimes/legacy/Cargo.toml similarity index 96% rename from next/Cargo.toml rename to runtimes/legacy/Cargo.toml index 2f913a919..57419bcbf 100644 --- a/next/Cargo.toml +++ b/runtimes/legacy/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "shuttle-next" +name = "shuttle-legacy" version = "0.1.0" edition = "2021" publish = false diff --git a/next/README.md b/runtimes/legacy/README.md similarity index 87% rename from next/README.md rename to runtimes/legacy/README.md index 3a9c2cabe..4915ab01f 100644 --- a/next/README.md +++ b/runtimes/legacy/README.md @@ -1,4 +1,4 @@ -## shuttle-next runtime-wrapper +## shuttle-legacy Load and run an .so library that implements `shuttle_service::Service`. diff --git a/next/src/args.rs b/runtimes/legacy/src/args.rs similarity index 100% rename from next/src/args.rs rename to runtimes/legacy/src/args.rs diff --git a/next/src/error.rs b/runtimes/legacy/src/error.rs similarity index 100% rename from next/src/error.rs rename to runtimes/legacy/src/error.rs diff --git a/next/src/lib.rs b/runtimes/legacy/src/lib.rs similarity index 100% rename from next/src/lib.rs rename to runtimes/legacy/src/lib.rs diff --git a/next/src/main.rs b/runtimes/legacy/src/main.rs similarity index 100% rename from next/src/main.rs rename to runtimes/legacy/src/main.rs