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/plugins/Cargo.toml deleted file mode 100644 index 76beb549a..000000000 --- a/plugins/Cargo.toml +++ /dev/null @@ -1,5 +0,0 @@ -[workspace] -members = [ - "serenity/wasm", - "serenity/runtime" -] diff --git a/plugins/serenity/Makefile b/plugins/serenity/Makefile deleted file mode 100644 index 5fd5bade8..000000000 --- a/plugins/serenity/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -.PHONY: wasm runtime - -all: wasm runtime - -wasm: - cd wasm; cargo build --target wasm32-wasi - cp ../target/wasm32-wasi/debug/shuttle_serenity.wasm runtime/bot.wasm - -test: wasm - cd runtime; cargo test -- --nocapture - -runtime: - cd runtime; cargo build diff --git a/runtimes/Cargo.toml b/runtimes/Cargo.toml new file mode 100644 index 000000000..025d17a42 --- /dev/null +++ b/runtimes/Cargo.toml @@ -0,0 +1,6 @@ +[workspace] +members = [ + "legacy", + "next", + "wasm" +] diff --git a/runtimes/Makefile b/runtimes/Makefile new file mode 100644 index 000000000..8bca54cab --- /dev/null +++ b/runtimes/Makefile @@ -0,0 +1,16 @@ +.PHONY: wasm next + +all: wasm next + +wasm: + cd wasm; cargo build --target wasm32-wasi + cp target/wasm32-wasi/debug/shuttle_serenity.wasm next/bot.wasm + +test: wasm + cd next; cargo test -- --nocapture + +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 diff --git a/plugins/serenity/runtime/Cargo.toml b/runtimes/next/Cargo.toml similarity index 94% rename from plugins/serenity/runtime/Cargo.toml rename to runtimes/next/Cargo.toml index a13f254ec..69e96b2fb 100644 --- a/plugins/serenity/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/plugins/serenity/runtime/README.md b/runtimes/next/README.md similarity index 88% rename from plugins/serenity/runtime/README.md rename to runtimes/next/README.md index 1bc6d03df..d0da79c83 100644 --- a/plugins/serenity/runtime/README.md +++ b/runtimes/next/README.md @@ -1,4 +1,4 @@ -# `shuttle-runtime` +# `shuttle-next` ## How to run diff --git a/plugins/serenity/runtime/src/lib.rs b/runtimes/next/src/lib.rs similarity index 100% rename from plugins/serenity/runtime/src/lib.rs rename to runtimes/next/src/lib.rs diff --git a/plugins/serenity/runtime/src/main.rs b/runtimes/next/src/main.rs similarity index 100% rename from plugins/serenity/runtime/src/main.rs rename to runtimes/next/src/main.rs diff --git a/plugins/serenity/wasm/Cargo.toml b/runtimes/wasm/Cargo.toml similarity index 100% rename from plugins/serenity/wasm/Cargo.toml rename to runtimes/wasm/Cargo.toml diff --git a/plugins/serenity/wasm/src/lib.rs b/runtimes/wasm/src/lib.rs similarity index 100% rename from plugins/serenity/wasm/src/lib.rs rename to runtimes/wasm/src/lib.rs