diff --git a/.circleci/config.yml b/.circleci/config.yml
index 967baf82f..f21e0a9e5 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -9,10 +9,12 @@ executors:
docker-rust:
docker:
- image: cimg/rust:1.65.0
+ resource_class: small
image-ubuntu:
machine:
image: ubuntu-2204:2022.04.1
docker_layer_caching: true
+ resource_class: xlarge
# sscache steps are from this guide
# https://medium.com/@edouard.oger/rust-caching-on-circleci-using-sccache-c996344f0115
@@ -86,18 +88,33 @@ commands:
cat\<< EOF > ~/.cargo/config.toml
[patch.crates-io]
shuttle-service = { path = "$PWD/service" }
+ shuttle-runtime = { path = "$PWD/runtime" }
+
shuttle-aws-rds = { path = "$PWD/resources/aws-rds" }
shuttle-persist = { path = "$PWD/resources/persist" }
shuttle-shared-db = { path = "$PWD/resources/shared-db" }
shuttle-secrets = { path = "$PWD/resources/secrets" }
shuttle-static-folder = { path = "$PWD/resources/static-folder" }
+
+ shuttle-axum = { path = "$PWD/services/shuttle-axum" }
+ shuttle-actix-web = { path = "$PWD/services/shuttle-actix-web" }
+ shuttle-next = { path = "$PWD/services/shuttle-next" }
+ shuttle-poem = { path = "$PWD/services/shuttle-poem" }
+ shuttle-poise = { path = "$PWD/services/shuttle-poise" }
+ shuttle-rocket = { path = "$PWD/services/shuttle-rocket" }
+ shuttle-salvo = { path = "$PWD/services/shuttle-salvo" }
+ shuttle-serenity = { path = "$PWD/services/shuttle-serenity" }
+ shuttle-thruster = { path = "$PWD/services/shuttle-thruster" }
+ shuttle-tide = { path = "$PWD/services/shuttle-tide" }
+ shuttle-tower = { path = "$PWD/services/shuttle-tower" }
+ shuttle-warp = { path = "$PWD/services/shuttle-warp" }
EOF
install-rust:
steps:
- run:
name: Install Rust
command: |
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target add wasm32-wasi
sudo apt update && sudo apt install -y libssl1.1
install-protoc:
steps:
@@ -146,33 +163,22 @@ commands:
- << parameters.target >>.env
jobs:
- workspace-fmt:
+ workspace:
executor: docker-rust
+ resource_class: xlarge
steps:
- checkout
- restore-cargo-cache
- install-protoc
- run: cargo fmt --all --check
- - run: cargo install cargo-sort
# TODO: this is incompatible with workspace inheritance, uncomment when
# https://github.com/DevinR528/cargo-sort/pull/29 is merged
+ # - run: cargo install cargo-sort
# - run: cargo sort --check --workspace
- - run: cargo check --workspace --all-targets
- - save-cargo-cache
- workspace-clippy:
- parameters:
- framework:
- description: "Framework to activate"
- type: string
- executor: docker-rust
- steps:
- - checkout
- - restore-cargo-cache
- - install-protoc
- run: |
cargo clippy --tests \
--all-targets \
- --features="codegen,loader,<< parameters.framework >>" \
+ --all-features \
--no-deps -- \
--D warnings \
-A clippy::let-unit-value \
@@ -190,9 +196,9 @@ jobs:
- install-protoc
- apply-patches
- run: cargo fmt --all --check --manifest-path << parameters.path >>/Cargo.toml
- - run: cargo install cargo-sort
# TODO: this is incompatible with workspace inheritance, uncomment when
# https://github.com/DevinR528/cargo-sort/pull/29 is merged
+ # - run: cargo install cargo-sort
# - run: cargo sort --check << parameters.path >>
- run: |
cargo clippy --tests \
@@ -205,20 +211,6 @@ jobs:
-A clippy::format-push-string
- run: cargo test --all-features --manifest-path << parameters.path >>/Cargo.toml -- --nocapture
- save-cargo-cache
- service-test:
- # Using an image since tests will start a docker container
- executor: image-ubuntu
- steps:
- - install-rust
- - checkout
- - restore-cargo-cache
- - run:
- name: Run unit tests
- command: cargo test --package shuttle-service --features="codegen,loader" --lib -- --nocapture
- - run:
- name: Run integration tests
- command: cargo test --package shuttle-service --features="codegen,loader" --test '*' -- --nocapture
- - save-cargo-cache
platform-test:
parameters:
crate:
@@ -228,6 +220,7 @@ jobs:
executor: image-ubuntu
steps:
- install-rust
+ - install-protoc
- checkout
- run: git submodule sync
- run: git submodule update --init
@@ -244,7 +237,6 @@ jobs:
(cargo test --package << parameters.crate >> --all-features --test '*' -- --list 2>&1 | grep -q "no test target matches pattern") && echo "nothing to test" || cargo test --package << parameters.crate >> --all-features --test '*' -- --nocapture
- save-cargo-cache
e2e-test:
- resource_class: xlarge
executor: image-ubuntu
steps:
- install-rust
@@ -276,7 +268,6 @@ jobs:
key: docker-buildx-{{ .Branch }}
when: always
build-and-push:
- resource_class: xlarge
executor: image-ubuntu
steps:
- checkout
@@ -350,7 +341,7 @@ jobs:
build-binaries-mac:
macos:
xcode: 12.5.1
- resource_class: medium
+ resource_class: xlarge
steps:
- checkout
- run:
@@ -388,28 +379,9 @@ jobs:
workflows:
ci:
jobs:
- - workspace-fmt
- - workspace-clippy:
- name: workspace-clippy-<< matrix.framework >>
- requires:
- - workspace-fmt
- matrix:
- parameters:
- framework:
- [
- "web-actix-web",
- "web-axum",
- "web-rocket",
- "web-poem",
- "web-thruster",
- "web-tide",
- "web-tower",
- "web-warp",
- "web-salvo",
- "bot-serenity",
- "bot-poise",
- ]
+ - workspace
- check-standalone:
+ name: << matrix.path >>
matrix:
parameters:
path:
@@ -418,27 +390,38 @@ workflows:
- resources/secrets
- resources/shared-db
- resources/static-folder
- - service-test:
- requires:
- - workspace-clippy
+ - services/shuttle-actix-web
+ - services/shuttle-axum
+ - services/shuttle-next
+ - services/shuttle-poem
+ - services/shuttle-poise
+ - services/shuttle-rocket
+ - services/shuttle-salvo
+ - services/shuttle-serenity
+ - services/shuttle-thruster
+ - services/shuttle-tide
+ - services/shuttle-tower
+ - services/shuttle-warp
- platform-test:
+ name: << matrix.crate >>
requires:
- - workspace-clippy
+ - workspace
matrix:
parameters:
crate:
[
"shuttle-auth",
- "shuttle-deployer",
"cargo-shuttle",
"shuttle-codegen",
"shuttle-common",
+ "shuttle-deployer",
"shuttle-proto",
"shuttle-provisioner",
+ "shuttle-runtime",
+ "shuttle-service",
]
- e2e-test:
requires:
- - service-test
- platform-test
- check-standalone
filters:
@@ -454,7 +437,7 @@ workflows:
name: build-binaries-x86_64-gnu
image: ubuntu-2204:2022.04.1
target: x86_64-unknown-linux-gnu
- resource_class: medium
+ resource_class: xlarge
filters:
branches:
only: production
@@ -462,7 +445,7 @@ workflows:
name: build-binaries-x86_64-musl
image: ubuntu-2204:2022.04.1
target: x86_64-unknown-linux-musl
- resource_class: medium
+ resource_class: xlarge
filters:
branches:
only: production
@@ -470,7 +453,7 @@ workflows:
name: build-binaries-aarch64
image: ubuntu-2004:202101-01
target: aarch64-unknown-linux-musl
- resource_class: arm.medium
+ resource_class: arm.xlarge
filters:
branches:
only: production
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 51c8a8511..e4569995c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -24,6 +24,9 @@ git clone git@github.com:shuttle-hq/shuttle.git
cd shuttle
```
+> Note: We need the git tags for the local development workflow, but they may not be included when you clone the repository.
+To make sure you have them, run `git fetch upstream --tags`, where upstream is the name of the shuttle remote repository.
+
You should now be ready to setup a local environment to test code changes to core `shuttle` packages as follows:
From the root of the shuttle repo, build the required images with:
@@ -53,13 +56,26 @@ In order to test local changes to the library crates, you may want to add the be
```toml
[patch.crates-io]
shuttle-service = { path = "[base]/shuttle/service" }
-shuttle-common = { path = "[base]/shuttle/common" }
-shuttle-proto = { path = "[base]/shuttle/proto" }
+shuttle-runtime = { path = "[base]/shuttle/runtime" }
+
shuttle-aws-rds = { path = "[base]/shuttle/resources/aws-rds" }
shuttle-persist = { path = "[base]/shuttle/resources/persist" }
shuttle-shared-db = { path = "[base]/shuttle/resources/shared-db" }
shuttle-secrets = { path = "[base]/shuttle/resources/secrets" }
shuttle-static-folder = { path = "[base]/shuttle/resources/static-folder" }
+
+shuttle-axum = { path = "[base]/shuttle/services/shuttle-axum" }
+shuttle-actix-web = { path = "[base]/shuttle/services/shuttle-actix-web" }
+shuttle-next = { path = "[base]/shuttle/services/shuttle-next" }
+shuttle-poem = { path = "[base]/shuttle/services/shuttle-poem" }
+shuttle-poise = { path = "[base]/shuttle/services/shuttle-poise" }
+shuttle-rocket = { path = "[base]/shuttle/services/shuttle-rocket" }
+shuttle-salvo = { path = "[base]/shuttle/services/shuttle-salvo" }
+shuttle-serenity = { path = "[base]/shuttle/services/shuttle-serenity" }
+shuttle-thruster = { path = "[base]/shuttle/services/shuttle-thruster" }
+shuttle-tide = { path = "[base]/shuttle/services/shuttle-tide" }
+shuttle-tower = { path = "[base]/shuttle/services/shuttle-tower" }
+shuttle-warp = { path = "[base]/shuttle/services/shuttle-warp" }
```
Before we can login to our local instance of shuttle, we need to create a user.
@@ -164,7 +180,7 @@ To run the unit tests for a specific crate, from the root of the repository run:
cargo test --package --all-features --lib -- --nocapture
```
-To run the integration tests for a spesific crate (if it has any), from the root of the repository run:
+To run the integration tests for a specific crate (if it has any), from the root of the repository run:
```bash
# replace with the name of the crate to test, e.g. `cargo-shuttle`
diff --git a/Cargo.lock b/Cargo.lock
index e15c70b8a..25fc411c9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8,7 +8,7 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "453e534d4f46dcdddd7aa8619e9a664e153f34383d14710db0b0d76c2964db89"
dependencies = [
- "base64 0.13.1",
+ "base64",
"hyper",
"openssl",
"reqwest",
@@ -21,182 +21,12 @@ dependencies = [
]
[[package]]
-name = "actix-codec"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57a7559404a7f3573127aab53c08ce37a6c6a315c374a31070f3c91cd1b4a7fe"
-dependencies = [
- "bitflags",
- "bytes 1.3.0",
- "futures-core",
- "futures-sink",
- "log",
- "memchr",
- "pin-project-lite 0.2.9",
- "tokio",
- "tokio-util 0.7.3",
-]
-
-[[package]]
-name = "actix-http"
-version = "3.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c83abf9903e1f0ad9973cc4f7b9767fd5a03a583f51a5b7a339e07987cd2724"
-dependencies = [
- "actix-codec",
- "actix-rt",
- "actix-service",
- "actix-utils",
- "ahash",
- "base64 0.13.1",
- "bitflags",
- "brotli",
- "bytes 1.3.0",
- "bytestring",
- "derive_more",
- "encoding_rs",
- "flate2",
- "futures-core",
- "h2",
- "http 0.2.8",
- "httparse",
- "httpdate",
- "itoa 1.0.2",
- "language-tags",
- "local-channel",
- "mime",
- "percent-encoding",
- "pin-project-lite 0.2.9",
- "rand 0.8.5",
- "sha1 0.10.4",
- "smallvec",
- "tracing",
- "zstd",
-]
-
-[[package]]
-name = "actix-macros"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6"
-dependencies = [
- "quote 1.0.21",
- "syn 1.0.104",
-]
-
-[[package]]
-name = "actix-router"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d66ff4d247d2b160861fa2866457e85706833527840e4133f8f49aa423a38799"
-dependencies = [
- "bytestring",
- "http 0.2.8",
- "regex",
- "serde",
- "tracing",
-]
-
-[[package]]
-name = "actix-rt"
-version = "2.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ea16c295198e958ef31930a6ef37d0fb64e9ca3b6116e6b93a8bdae96ee1000"
-dependencies = [
- "futures-core",
- "tokio",
-]
-
-[[package]]
-name = "actix-server"
-version = "2.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0da34f8e659ea1b077bb4637948b815cd3768ad5a188fdcd74ff4d84240cd824"
-dependencies = [
- "actix-rt",
- "actix-service",
- "actix-utils",
- "futures-core",
- "futures-util",
- "mio",
- "num_cpus",
- "socket2",
- "tokio",
- "tracing",
-]
-
-[[package]]
-name = "actix-service"
-version = "2.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a"
-dependencies = [
- "futures-core",
- "paste",
- "pin-project-lite 0.2.9",
-]
-
-[[package]]
-name = "actix-utils"
-version = "3.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8"
-dependencies = [
- "local-waker",
- "pin-project-lite 0.2.9",
-]
-
-[[package]]
-name = "actix-web"
-version = "4.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d48f7b6534e06c7bfc72ee91db7917d4af6afe23e7d223b51e68fffbb21e96b9"
-dependencies = [
- "actix-codec",
- "actix-http",
- "actix-macros",
- "actix-router",
- "actix-rt",
- "actix-server",
- "actix-service",
- "actix-utils",
- "actix-web-codegen",
- "ahash",
- "bytes 1.3.0",
- "bytestring",
- "cfg-if 1.0.0",
- "cookie 0.16.0",
- "derive_more",
- "encoding_rs",
- "futures-core",
- "futures-util",
- "http 0.2.8",
- "itoa 1.0.2",
- "language-tags",
- "log",
- "mime",
- "once_cell",
- "pin-project-lite 0.2.9",
- "regex",
- "serde",
- "serde_json",
- "serde_urlencoded",
- "smallvec",
- "socket2",
- "time 0.3.11",
- "url",
-]
-
-[[package]]
-name = "actix-web-codegen"
-version = "4.1.0"
+name = "addr2line"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fa9362663c8643d67b2d5eafba49e4cb2c8a053a29ed00a0bea121f17c76b13"
+checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b"
dependencies = [
- "actix-router",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "gimli",
]
[[package]]
@@ -205,102 +35,13 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
-[[package]]
-name = "aead"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331"
-dependencies = [
- "generic-array",
-]
-
-[[package]]
-name = "aead"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877"
-dependencies = [
- "generic-array",
-]
-
-[[package]]
-name = "aes"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561"
-dependencies = [
- "aes-soft",
- "aesni",
- "cipher 0.2.5",
-]
-
-[[package]]
-name = "aes"
-version = "0.7.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8"
-dependencies = [
- "cfg-if 1.0.0",
- "cipher 0.3.0",
- "cpufeatures",
- "opaque-debug",
-]
-
-[[package]]
-name = "aes-gcm"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da"
-dependencies = [
- "aead 0.3.2",
- "aes 0.6.0",
- "cipher 0.2.5",
- "ctr 0.6.0",
- "ghash 0.3.1",
- "subtle",
-]
-
-[[package]]
-name = "aes-gcm"
-version = "0.9.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6"
-dependencies = [
- "aead 0.4.3",
- "aes 0.7.5",
- "cipher 0.3.0",
- "ctr 0.8.0",
- "ghash 0.4.4",
- "subtle",
-]
-
-[[package]]
-name = "aes-soft"
-version = "0.6.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072"
-dependencies = [
- "cipher 0.2.5",
- "opaque-debug",
-]
-
-[[package]]
-name = "aesni"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce"
-dependencies = [
- "cipher 0.2.5",
- "opaque-debug",
-]
-
[[package]]
name = "ahash"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
dependencies = [
- "getrandom 0.2.7",
+ "getrandom",
"once_cell",
"version_check",
]
@@ -315,19 +56,10 @@ dependencies = [
]
[[package]]
-name = "alloc-no-stdlib"
-version = "2.0.4"
+name = "ambient-authority"
+version = "0.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
-
-[[package]]
-name = "alloc-stdlib"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"
-dependencies = [
- "alloc-no-stdlib",
-]
+checksum = "ec8ad6edb4840b78c5c3d88de606b22252d552b55f3a4699fbb10fc070ec3049"
[[package]]
name = "android_system_properties"
@@ -362,6 +94,12 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
+[[package]]
+name = "arrayvec"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6"
+
[[package]]
name = "assert_cmd"
version = "2.0.6"
@@ -376,107 +114,6 @@ dependencies = [
"wait-timeout",
]
-[[package]]
-name = "async-channel"
-version = "1.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319"
-dependencies = [
- "concurrent-queue",
- "event-listener",
- "futures-core",
-]
-
-[[package]]
-name = "async-compression"
-version = "0.3.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "345fd392ab01f746c717b1357165b76f0b67a60192007b234058c9045fdcf695"
-dependencies = [
- "brotli",
- "flate2",
- "futures-core",
- "memchr",
- "pin-project-lite 0.2.9",
- "tokio",
-]
-
-[[package]]
-name = "async-dup"
-version = "1.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7427a12b8dc09291528cfb1da2447059adb4a257388c2acd6497a79d55cf6f7c"
-dependencies = [
- "futures-io",
- "simple-mutex",
-]
-
-[[package]]
-name = "async-executor"
-version = "1.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965"
-dependencies = [
- "async-task",
- "concurrent-queue",
- "fastrand",
- "futures-lite",
- "once_cell",
- "slab",
-]
-
-[[package]]
-name = "async-global-executor"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5262ed948da60dd8956c6c5aca4d4163593dddb7b32d73267c93dab7b2e98940"
-dependencies = [
- "async-channel",
- "async-executor",
- "async-io",
- "async-lock",
- "blocking",
- "futures-lite",
- "num_cpus",
- "once_cell",
- "tokio",
-]
-
-[[package]]
-name = "async-h1"
-version = "2.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8101020758a4fc3a7c326cb42aa99e9fa77cbfb76987c128ad956406fe1f70a7"
-dependencies = [
- "async-channel",
- "async-dup",
- "async-std",
- "futures-core",
- "http-types",
- "httparse",
- "log",
- "pin-project",
-]
-
-[[package]]
-name = "async-io"
-version = "1.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5e18f61464ae81cde0a23e713ae8fd299580c54d697a35820cfd0625b8b0e07"
-dependencies = [
- "concurrent-queue",
- "futures-lite",
- "libc",
- "log",
- "once_cell",
- "parking",
- "polling",
- "slab",
- "socket2",
- "waker-fn",
- "winapi",
-]
-
[[package]]
name = "async-lock"
version = "2.5.0"
@@ -486,44 +123,6 @@ dependencies = [
"event-listener",
]
-[[package]]
-name = "async-process"
-version = "1.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf2c06e30a24e8c78a3987d07f0930edf76ef35e027e7bdb063fccafdad1f60c"
-dependencies = [
- "async-io",
- "blocking",
- "cfg-if 1.0.0",
- "event-listener",
- "futures-lite",
- "libc",
- "once_cell",
- "signal-hook",
- "winapi",
-]
-
-[[package]]
-name = "async-session"
-version = "2.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "345022a2eed092cd105cc1b26fd61c341e100bd5fcbbd792df4baf31c2cc631f"
-dependencies = [
- "anyhow",
- "async-std",
- "async-trait",
- "base64 0.12.3",
- "bincode",
- "blake3",
- "chrono",
- "hmac 0.8.1",
- "kv-log-macro",
- "rand 0.7.3",
- "serde",
- "serde_json",
- "sha2 0.9.9",
-]
-
[[package]]
name = "async-session"
version = "3.0.0"
@@ -533,59 +132,18 @@ dependencies = [
"anyhow",
"async-lock",
"async-trait",
- "base64 0.13.1",
+ "base64",
"bincode",
"blake3",
"chrono",
"hmac 0.11.0",
"log",
- "rand 0.8.5",
+ "rand",
"serde",
"serde_json",
"sha2 0.9.9",
]
-[[package]]
-name = "async-sse"
-version = "4.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53bba003996b8fd22245cd0c59b869ba764188ed435392cf2796d03b805ade10"
-dependencies = [
- "async-channel",
- "async-std",
- "http-types",
- "log",
- "memchr",
- "pin-project-lite 0.1.12",
-]
-
-[[package]]
-name = "async-std"
-version = "1.12.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d"
-dependencies = [
- "async-channel",
- "async-global-executor",
- "async-io",
- "async-lock",
- "async-process",
- "crossbeam-utils",
- "futures-channel",
- "futures-core",
- "futures-io",
- "futures-lite",
- "gloo-timers",
- "kv-log-macro",
- "log",
- "memchr",
- "once_cell",
- "pin-project-lite 0.2.9",
- "pin-utils",
- "slab",
- "wasm-bindgen-futures",
-]
-
[[package]]
name = "async-stream"
version = "0.3.3"
@@ -602,42 +160,20 @@ version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "proc-macro2",
+ "quote",
+ "syn",
]
-[[package]]
-name = "async-task"
-version = "4.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30696a84d817107fc028e049980e09d5e140e8da8f1caeb17e8e950658a3cea9"
-
[[package]]
name = "async-trait"
version = "0.1.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e805d94e6b5001b651426cf4cd446b1ab5f319d27bab5c644f61de0a804360c"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
-]
-
-[[package]]
-name = "async-tungstenite"
-version = "0.17.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1b71b31561643aa8e7df3effe284fa83ab1a840e52294c5f4bd7bfd8b2becbb"
-dependencies = [
- "futures-io",
- "futures-util",
- "log",
- "pin-project-lite 0.2.9",
- "tokio",
- "tokio-rustls",
- "tungstenite",
- "webpki-roots",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -649,21 +185,6 @@ dependencies = [
"num-traits",
]
-[[package]]
-name = "atomic"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b88d82667eca772c4aa12f0f1348b3ae643424c8876448f3f7bd5787032e234c"
-dependencies = [
- "autocfg 1.1.0",
-]
-
-[[package]]
-name = "atomic-waker"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a"
-
[[package]]
name = "atty"
version = "0.2.14"
@@ -675,15 +196,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "autocfg"
-version = "0.1.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78"
-dependencies = [
- "autocfg 1.1.0",
-]
-
[[package]]
name = "autocfg"
version = "1.1.0"
@@ -706,12 +218,12 @@ dependencies = [
"aws-smithy-json",
"aws-smithy-types",
"aws-types",
- "bytes 1.3.0",
+ "bytes",
"hex 0.4.3",
- "http 0.2.8",
+ "http",
"hyper",
"ring",
- "time 0.3.11",
+ "time",
"tokio",
"tower",
"tracing",
@@ -727,7 +239,7 @@ dependencies = [
"aws-smithy-http",
"aws-smithy-types",
"aws-types",
- "http 0.2.8",
+ "http",
"regex",
"tracing",
]
@@ -741,12 +253,12 @@ dependencies = [
"aws-smithy-http",
"aws-smithy-types",
"aws-types",
- "bytes 1.3.0",
- "http 0.2.8",
+ "bytes",
+ "http",
"http-body",
"lazy_static",
"percent-encoding",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"tracing",
]
@@ -767,8 +279,8 @@ dependencies = [
"aws-smithy-types",
"aws-smithy-xml",
"aws-types",
- "bytes 1.3.0",
- "http 0.2.8",
+ "bytes",
+ "http",
"tokio-stream",
"tower",
]
@@ -789,8 +301,8 @@ dependencies = [
"aws-smithy-json",
"aws-smithy-types",
"aws-types",
- "bytes 1.3.0",
- "http 0.2.8",
+ "bytes",
+ "http",
"tokio-stream",
"tower",
]
@@ -812,8 +324,8 @@ dependencies = [
"aws-smithy-types",
"aws-smithy-xml",
"aws-types",
- "bytes 1.3.0",
- "http 0.2.8",
+ "bytes",
+ "http",
"tower",
]
@@ -826,7 +338,7 @@ dependencies = [
"aws-sigv4",
"aws-smithy-http",
"aws-types",
- "http 0.2.8",
+ "http",
"tracing",
]
@@ -839,12 +351,12 @@ dependencies = [
"aws-smithy-http",
"form_urlencoded",
"hex 0.4.3",
- "http 0.2.8",
+ "http",
"once_cell",
"percent-encoding",
"regex",
"ring",
- "time 0.3.11",
+ "time",
"tracing",
]
@@ -855,7 +367,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b3442b4c5d3fc39891a2e5e625735fba6b24694887d49c6518460fde98247a9"
dependencies = [
"futures-util",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"tokio",
"tokio-stream",
]
@@ -870,14 +382,14 @@ dependencies = [
"aws-smithy-http",
"aws-smithy-http-tower",
"aws-smithy-types",
- "bytes 1.3.0",
+ "bytes",
"fastrand",
- "http 0.2.8",
+ "http",
"http-body",
"hyper",
"hyper-rustls",
"lazy_static",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"tokio",
"tower",
"tracing",
@@ -890,18 +402,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf58ed4fefa61dbf038e5421a521cbc2c448ef69deff0ab1d915d8a10eda5664"
dependencies = [
"aws-smithy-types",
- "bytes 1.3.0",
+ "bytes",
"bytes-utils",
"futures-core",
- "http 0.2.8",
+ "http",
"http-body",
"hyper",
"once_cell",
"percent-encoding",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"pin-utils",
"tokio",
- "tokio-util 0.7.3",
+ "tokio-util",
"tracing",
]
@@ -912,10 +424,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20c96d7bd35e7cf96aca1134b2f81b1b59ffe493f7c6539c051791cbbf7a42d3"
dependencies = [
"aws-smithy-http",
- "bytes 1.3.0",
- "http 0.2.8",
+ "bytes",
+ "http",
"http-body",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"tower",
"tracing",
]
@@ -945,10 +457,10 @@ version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b02e06ea63498c43bc0217ea4d16605d4e58d85c12fc23f6572ff6d0a840c61"
dependencies = [
- "itoa 1.0.2",
+ "itoa",
"num-integer",
"ryu",
- "time 0.3.11",
+ "time",
]
[[package]]
@@ -970,7 +482,7 @@ dependencies = [
"aws-smithy-client",
"aws-smithy-http",
"aws-smithy-types",
- "http 0.2.8",
+ "http",
"rustc_version 0.4.0",
"tracing",
"zeroize",
@@ -984,20 +496,20 @@ checksum = "744864363a200a5e724a7e61bc8c11b6628cf2e3ec519c8a1a48e609a8156b40"
dependencies = [
"async-trait",
"axum-core",
- "base64 0.13.1",
+ "base64",
"bitflags",
- "bytes 1.3.0",
+ "bytes",
"futures-util",
"headers",
- "http 0.2.8",
+ "http",
"http-body",
"hyper",
- "itoa 1.0.2",
+ "itoa",
"matchit",
"memchr",
"mime",
"percent-encoding",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"rustversion",
"serde",
"serde_json",
@@ -1020,9 +532,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79b8558f5a0581152dc94dcd289132a1d377494bdeafcd41869b3258e3e2ad92"
dependencies = [
"async-trait",
- "bytes 1.3.0",
+ "bytes",
"futures-util",
- "http 0.2.8",
+ "http",
"http-body",
"mime",
"rustversion",
@@ -1037,12 +549,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9a320103719de37b7b4da4c8eb629d4573f6bcfd3dfe80d3208806895ccf81d"
dependencies = [
"axum",
- "bytes 1.3.0",
+ "bytes",
"cookie 0.16.0",
"futures-util",
- "http 0.2.8",
+ "http",
"mime",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"tokio",
"tower",
"tower-http 0.3.5",
@@ -1057,12 +569,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51227033e4d3acad15c879092ac8a228532707b5db5ff2628f638334f63e1b7a"
dependencies = [
"axum",
- "bytes 1.3.0",
+ "bytes",
"cookie 0.17.0",
"futures-util",
- "http 0.2.8",
+ "http",
"mime",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"tokio",
"tower",
"tower-http 0.3.5",
@@ -1077,14 +589,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8456dab8f11484979a86651da8e619b355ede5d61a160755155f6c344bd18c47"
dependencies = [
"arc-swap",
- "bytes 1.3.0",
+ "bytes",
"futures-util",
- "http 0.2.8",
+ "http",
"http-body",
"hyper",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"rustls",
- "rustls-pemfile 1.0.1",
+ "rustls-pemfile",
"tokio",
"tokio-rustls",
"tower-service",
@@ -1096,7 +608,7 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b114309d293dd8a6fedebf09d5b8bbb0f7647b3d204ca0dd333b5f797aed5c8"
dependencies = [
- "async-session 3.0.0",
+ "async-session",
"axum",
"axum-extra 0.4.2",
"futures",
@@ -1106,30 +618,12 @@ dependencies = [
"tracing",
]
-[[package]]
-name = "base-x"
-version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270"
-
-[[package]]
-name = "base64"
-version = "0.12.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
-
[[package]]
name = "base64"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
-[[package]]
-name = "binascii"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "383d29d513d8764dcdc42ea295d979eb99c3c9f00607b3692cf68a431f7dca72"
-
[[package]]
name = "bincode"
version = "1.3.3"
@@ -1161,7 +655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3"
dependencies = [
"arrayref",
- "arrayvec",
+ "arrayvec 0.5.2",
"cc",
"cfg-if 0.1.10",
"constant_time_eq",
@@ -1187,44 +681,30 @@ dependencies = [
"generic-array",
]
-[[package]]
-name = "blocking"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6ccb65d468978a086b69884437ded69a90faab3bbe6e67f242173ea728acccc"
-dependencies = [
- "async-channel",
- "async-task",
- "atomic-waker",
- "fastrand",
- "futures-lite",
- "once_cell",
-]
-
[[package]]
name = "bollard"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d82e7850583ead5f8bbef247e2a3c37a19bd576e8420cd262a6711921827e1e5"
dependencies = [
- "base64 0.13.1",
+ "base64",
"bollard-stubs",
- "bytes 1.3.0",
+ "bytes",
"futures-core",
"futures-util",
"hex 0.4.3",
- "http 0.2.8",
+ "http",
"hyper",
"hyperlocal",
"log",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"serde",
"serde_derive",
"serde_json",
"serde_urlencoded",
"thiserror",
"tokio",
- "tokio-util 0.7.3",
+ "tokio-util",
"url",
"winapi",
]
@@ -1239,27 +719,6 @@ dependencies = [
"serde_with",
]
-[[package]]
-name = "brotli"
-version = "3.3.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68"
-dependencies = [
- "alloc-no-stdlib",
- "alloc-stdlib",
- "brotli-decompressor",
-]
-
-[[package]]
-name = "brotli-decompressor"
-version = "2.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59ad2d4653bf5ca36ae797b1f4bb4dbddb60ce49ca4aed8a2ce4829f60425b80"
-dependencies = [
- "alloc-no-stdlib",
- "alloc-stdlib",
-]
-
[[package]]
name = "bson"
version = "2.5.0"
@@ -1267,16 +726,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8746d07211bb12a7c34d995539b4a2acd4e0b0e757de98ce2ab99bcf17443fad"
dependencies = [
"ahash",
- "base64 0.13.1",
+ "base64",
"hex 0.4.3",
"indexmap",
"lazy_static",
- "rand 0.8.5",
+ "rand",
"serde",
"serde_bytes",
"serde_json",
- "time 0.3.11",
- "uuid 1.2.2",
+ "time",
+ "uuid",
]
[[package]]
@@ -1302,16 +761,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "buf_redux"
-version = "0.8.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b953a6887648bb07a535631f2bc00fbdb2a2216f135552cb3f534ed136b9c07f"
-dependencies = [
- "memchr",
- "safemem",
-]
-
[[package]]
name = "bumpalo"
version = "3.10.0"
@@ -1324,22 +773,6 @@ version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
-[[package]]
-name = "bytes"
-version = "0.4.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c"
-dependencies = [
- "byteorder",
- "iovec",
-]
-
-[[package]]
-name = "bytes"
-version = "0.5.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38"
-
[[package]]
name = "bytes"
version = "1.3.0"
@@ -1352,7 +785,7 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1934a3ef9cac8efde4966a92781e77713e1ba329f1d42e446c7d7eba340d8ef1"
dependencies = [
- "bytes 1.3.0",
+ "bytes",
"either",
]
@@ -1363,27 +796,76 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c58ec36aac5066d5ca17df51b3e70279f5670a72102f5752cb7e7c856adfc70"
[[package]]
-name = "bytestring"
-version = "1.2.0"
+name = "camino"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7f83e57d9154148e355404702e2694463241880b939570d7c97c014da7a69a1"
+checksum = "869119e97797867fd90f5e22af7d0bd274bd4635ebb9eb68c04f3f513ae6c412"
dependencies = [
- "bytes 1.3.0",
+ "serde",
]
[[package]]
-name = "cache-padded"
-version = "1.2.0"
+name = "cap-fs-ext"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c"
+checksum = "0f8079425cfd20227020f2bff1320710ca68d6eddb4f64aba8e2741b2b4d8133"
+dependencies = [
+ "cap-primitives",
+ "cap-std",
+ "io-lifetimes",
+ "windows-sys 0.42.0",
+]
[[package]]
-name = "camino"
-version = "1.0.9"
+name = "cap-primitives"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "869119e97797867fd90f5e22af7d0bd274bd4635ebb9eb68c04f3f513ae6c412"
+checksum = "84bf8faa0b6397a4e26082818be03641a40e3aba1afc4ec44cbd6228c73c3a61"
dependencies = [
- "serde",
+ "ambient-authority",
+ "fs-set-times",
+ "io-extras",
+ "io-lifetimes",
+ "ipnet",
+ "maybe-owned",
+ "rustix",
+ "windows-sys 0.42.0",
+ "winx",
+]
+
+[[package]]
+name = "cap-rand"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53df044ddcb88611e19b712211b342ab106105cf658406f5ed4ee09ab10ed727"
+dependencies = [
+ "ambient-authority",
+ "rand",
+]
+
+[[package]]
+name = "cap-std"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4ad2b9e262a5c3b67ee92e4b9607ace704384c50c32aa6017a9282ddf15df20"
+dependencies = [
+ "cap-primitives",
+ "io-extras",
+ "io-lifetimes",
+ "ipnet",
+ "rustix",
+]
+
+[[package]]
+name = "cap-time-ext"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6dcbdbcced5c88b20f27c637faaed5dd283898cbefea48d2d8f3dcfaf048e5cc"
+dependencies = [
+ "cap-primitives",
+ "once_cell",
+ "rustix",
+ "winx",
]
[[package]]
@@ -1430,7 +912,7 @@ dependencies = [
"percent-encoding",
"rustc-workspace-hack",
"rustfix",
- "semver 1.0.14",
+ "semver 1.0.16",
"serde",
"serde_ignored",
"serde_json",
@@ -1441,7 +923,7 @@ dependencies = [
"termcolor",
"toml_edit 0.14.4",
"unicode-width",
- "unicode-xid 0.2.3",
+ "unicode-xid",
"url",
"walkdir",
"winapi",
@@ -1467,7 +949,7 @@ dependencies = [
"native-tls",
"pathdiff",
"regex",
- "semver 1.0.14",
+ "semver 1.0.16",
"serde",
"serde_derive",
"serde_json",
@@ -1489,7 +971,7 @@ dependencies = [
[[package]]
name = "cargo-shuttle"
-version = "0.11.2"
+version = "0.12.0"
dependencies = [
"anyhow",
"assert_cmd",
@@ -1505,10 +987,12 @@ dependencies = [
"crossterm",
"dialoguer",
"dirs",
+ "dunce",
"flate2",
"futures",
"git2",
"headers",
+ "home",
"ignore",
"indicatif",
"indoc",
@@ -1522,6 +1006,7 @@ dependencies = [
"serde",
"serde_json",
"shuttle-common",
+ "shuttle-proto",
"shuttle-secrets",
"shuttle-service",
"sqlx",
@@ -1534,10 +1019,11 @@ dependencies = [
"tokiotest-httpserver",
"toml",
"toml_edit 0.15.0",
+ "tonic",
"tracing",
"tracing-subscriber",
"url",
- "uuid 1.2.2",
+ "uuid",
"webbrowser",
]
@@ -1571,7 +1057,7 @@ checksum = "982a0cf6a99c350d7246035613882e376d58cebe571785abc5da4f648d53ac0a"
dependencies = [
"camino",
"cargo-platform",
- "semver 1.0.14",
+ "semver 1.0.16",
"serde",
"serde_json",
"thiserror",
@@ -1611,12 +1097,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f"
dependencies = [
"iana-time-zone",
- "js-sys",
"num-integer",
"num-traits",
"serde",
- "time 0.1.44",
- "wasm-bindgen",
"winapi",
]
@@ -1626,24 +1109,6 @@ version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e"
-[[package]]
-name = "cipher"
-version = "0.2.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801"
-dependencies = [
- "generic-array",
-]
-
-[[package]]
-name = "cipher"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
-dependencies = [
- "generic-array",
-]
-
[[package]]
name = "clap"
version = "3.2.23"
@@ -1694,9 +1159,9 @@ checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65"
dependencies = [
"heck",
"proc-macro-error",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -1707,9 +1172,9 @@ checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014"
dependencies = [
"heck",
"proc-macro-error",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -1730,15 +1195,6 @@ dependencies = [
"os_str_bytes",
]
-[[package]]
-name = "cloudabi"
-version = "0.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
-dependencies = [
- "bitflags",
-]
-
[[package]]
name = "colored"
version = "2.0.0"
@@ -1756,7 +1212,7 @@ version = "4.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4"
dependencies = [
- "bytes 1.3.0",
+ "bytes",
"memchr",
]
@@ -1813,15 +1269,6 @@ version = "0.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad159cc964ac8f9d407cbc0aa44b02436c054b541f2b4b5f06972e1efdc54bc7"
-[[package]]
-name = "concurrent-queue"
-version = "1.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3"
-dependencies = [
- "cache-padded",
-]
-
[[package]]
name = "console"
version = "0.15.2"
@@ -1836,12 +1283,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "const_fn"
-version = "0.4.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935"
-
[[package]]
name = "constant_time_eq"
version = "0.1.5"
@@ -1852,84 +1293,181 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
name = "convert_case"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
+checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
+
+[[package]]
+name = "cookie"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94d4706de1b0fa5b132270cddffa8585166037822e260a944fe161acd137ca05"
+dependencies = [
+ "base64",
+ "hmac 0.12.1",
+ "percent-encoding",
+ "rand",
+ "sha2 0.10.2",
+ "subtle",
+ "time",
+ "version_check",
+]
+
+[[package]]
+name = "cookie"
+version = "0.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24"
+dependencies = [
+ "percent-encoding",
+ "time",
+ "version_check",
+]
+
+[[package]]
+name = "core-foundation"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
+
+[[package]]
+name = "cpp_demangle"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f"
+dependencies = [
+ "cfg-if 1.0.0",
+]
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "cranelift-bforest"
+version = "0.91.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc952b310b24444fc14ab8b9cbe3fafd7e7329e3eec84c3a9b11d2b5cf6f3be1"
+dependencies = [
+ "cranelift-entity",
+]
+
+[[package]]
+name = "cranelift-codegen"
+version = "0.91.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e73470419b33011e50dbf0f6439cbccbaabe9381de172da4e1b6efcda4bb8fa7"
+dependencies = [
+ "arrayvec 0.7.2",
+ "bumpalo",
+ "cranelift-bforest",
+ "cranelift-codegen-meta",
+ "cranelift-codegen-shared",
+ "cranelift-egraph",
+ "cranelift-entity",
+ "cranelift-isle",
+ "gimli",
+ "log",
+ "regalloc2",
+ "smallvec",
+ "target-lexicon",
+]
[[package]]
-name = "cookie"
-version = "0.14.4"
+name = "cranelift-codegen-meta"
+version = "0.91.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951"
+checksum = "911a1872464108a11ac9965c2b079e61bbdf1bc2e0b9001264264add2e12a38f"
dependencies = [
- "aes-gcm 0.8.0",
- "base64 0.13.1",
- "hkdf 0.10.0",
- "hmac 0.10.1",
- "percent-encoding",
- "rand 0.8.5",
- "sha2 0.9.9",
- "time 0.2.27",
- "version_check",
+ "cranelift-codegen-shared",
]
[[package]]
-name = "cookie"
-version = "0.16.0"
+name = "cranelift-codegen-shared"
+version = "0.91.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94d4706de1b0fa5b132270cddffa8585166037822e260a944fe161acd137ca05"
+checksum = "e036f3f07adb24a86fb46e977e8fe03b18bb16b1eada949cf2c48283e5f8a862"
+
+[[package]]
+name = "cranelift-egraph"
+version = "0.91.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d6c623f4b5d2a6bad32c403f03765d4484a827eb93ee78f8cb6219ef118fd59"
dependencies = [
- "aes-gcm 0.9.4",
- "base64 0.13.1",
- "hkdf 0.12.3",
- "hmac 0.12.1",
- "percent-encoding",
- "rand 0.8.5",
- "sha2 0.10.2",
- "subtle",
- "time 0.3.11",
- "version_check",
+ "cranelift-entity",
+ "fxhash",
+ "hashbrown",
+ "indexmap",
+ "log",
+ "smallvec",
]
[[package]]
-name = "cookie"
-version = "0.17.0"
+name = "cranelift-entity"
+version = "0.91.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24"
+checksum = "74385eb5e405b3562f0caa7bcc4ab9a93c7958dd5bcd0e910bffb7765eacd6fc"
dependencies = [
- "percent-encoding",
- "time 0.3.11",
- "version_check",
+ "serde",
]
[[package]]
-name = "core-foundation"
-version = "0.9.3"
+name = "cranelift-frontend"
+version = "0.91.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
+checksum = "8a4ac920422ee36bff2c66257fec861765e3d95a125cdf58d8c0f3bba7e40e61"
dependencies = [
- "core-foundation-sys",
- "libc",
+ "cranelift-codegen",
+ "log",
+ "smallvec",
+ "target-lexicon",
]
[[package]]
-name = "core-foundation-sys"
-version = "0.8.3"
+name = "cranelift-isle"
+version = "0.91.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
+checksum = "c541263fb37ad2baa53ec8c37218ee5d02fa0984670d9419dedd8002ea68ff08"
[[package]]
-name = "cpufeatures"
-version = "0.2.2"
+name = "cranelift-native"
+version = "0.91.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b"
+checksum = "1de5d7a063e8563d670aaca38de16591a9b70dc66cbad4d49a7b4ae8395fd1ce"
dependencies = [
+ "cranelift-codegen",
"libc",
+ "target-lexicon",
]
[[package]]
-name = "cpuid-bool"
-version = "0.2.0"
+name = "cranelift-wasm"
+version = "0.91.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba"
+checksum = "dfbc4dd03b713b5d71b582915b8c272f4813cdd8c99a3e03d9ba70c44468a6e0"
+dependencies = [
+ "cranelift-codegen",
+ "cranelift-entity",
+ "cranelift-frontend",
+ "itertools",
+ "log",
+ "smallvec",
+ "wasmparser",
+ "wasmtime-types",
+]
[[package]]
name = "crates-index"
@@ -1944,7 +1482,7 @@ dependencies = [
"num_cpus",
"rayon",
"rustc-hash",
- "semver 1.0.14",
+ "semver 1.0.16",
"serde",
"serde_derive",
"serde_json",
@@ -2017,7 +1555,7 @@ version = "0.9.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a"
dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
"cfg-if 1.0.0",
"crossbeam-utils",
"memoffset 0.7.1",
@@ -2069,16 +1607,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "cruet"
-version = "0.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e0d174765c7d11eb16f70a4213583aac2ca5ae1ebd1e233c6d5104bfb70fce3"
-dependencies = [
- "once_cell",
- "regex",
-]
-
[[package]]
name = "crypto-common"
version = "0.1.3"
@@ -2111,16 +1639,6 @@ dependencies = [
"subtle",
]
-[[package]]
-name = "crypto-mac"
-version = "0.10.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a"
-dependencies = [
- "generic-array",
- "subtle",
-]
-
[[package]]
name = "crypto-mac"
version = "0.11.1"
@@ -2137,26 +1655,8 @@ version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096"
dependencies = [
- "quote 1.0.21",
- "syn 1.0.104",
-]
-
-[[package]]
-name = "ctr"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f"
-dependencies = [
- "cipher 0.2.5",
-]
-
-[[package]]
-name = "ctr"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea"
-dependencies = [
- "cipher 0.3.0",
+ "quote",
+ "syn",
]
[[package]]
@@ -2202,18 +1702,8 @@ version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c"
dependencies = [
- "darling_core 0.13.4",
- "darling_macro 0.13.4",
-]
-
-[[package]]
-name = "darling"
-version = "0.14.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4529658bdda7fd6769b8614be250cdcfc3aeb0ee72fe66f9e41e5e5eb73eac02"
-dependencies = [
- "darling_core 0.14.1",
- "darling_macro 0.14.1",
+ "darling_core",
+ "darling_macro",
]
[[package]]
@@ -2224,24 +1714,10 @@ checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610"
dependencies = [
"fnv",
"ident_case",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "strsim",
- "syn 1.0.104",
-]
-
-[[package]]
-name = "darling_core"
-version = "0.14.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "649c91bc01e8b1eac09fb91e8dbc7d517684ca6be8ebc75bb9cafc894f9fdb6f"
-dependencies = [
- "fnv",
- "ident_case",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
+ "proc-macro2",
+ "quote",
"strsim",
- "syn 1.0.104",
+ "syn",
]
[[package]]
@@ -2250,20 +1726,9 @@ version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835"
dependencies = [
- "darling_core 0.13.4",
- "quote 1.0.21",
- "syn 1.0.104",
-]
-
-[[package]]
-name = "darling_macro"
-version = "0.14.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5"
-dependencies = [
- "darling_core 0.14.1",
- "quote 1.0.21",
- "syn 1.0.104",
+ "darling_core",
+ "quote",
+ "syn",
]
[[package]]
@@ -2277,7 +1742,6 @@ dependencies = [
"lock_api",
"once_cell",
"parking_lot_core 0.9.3",
- "serde",
]
[[package]]
@@ -2292,9 +1756,9 @@ version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -2304,43 +1768,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
dependencies = [
"convert_case",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
+ "proc-macro2",
+ "quote",
"rustc_version 0.4.0",
- "syn 1.0.104",
-]
-
-[[package]]
-name = "devise"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50c7580b072f1c8476148f16e0a0d5dedddab787da98d86c5082c5e9ed8ab595"
-dependencies = [
- "devise_codegen",
- "devise_core",
-]
-
-[[package]]
-name = "devise_codegen"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "123c73e7a6e51b05c75fe1a1b2f4e241399ea5740ed810b0e3e6cacd9db5e7b2"
-dependencies = [
- "devise_core",
- "quote 1.0.21",
-]
-
-[[package]]
-name = "devise_core"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "841ef46f4787d9097405cac4e70fb8644fc037b526e8c14054247c0263c400d0"
-dependencies = [
- "bitflags",
- "proc-macro2 1.0.47",
- "proc-macro2-diagnostics",
- "quote 1.0.21",
- "syn 1.0.104",
+ "syn",
]
[[package]]
@@ -2387,6 +1818,16 @@ dependencies = [
"subtle",
]
+[[package]]
+name = "directories-next"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc"
+dependencies = [
+ "cfg-if 1.0.0",
+ "dirs-sys-next",
+]
+
[[package]]
name = "dirs"
version = "4.0.0"
@@ -2428,12 +1869,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "discard"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
-
[[package]]
name = "doc-comment"
version = "0.3.3"
@@ -2483,29 +1918,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73"
dependencies = [
"heck",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
-]
-
-[[package]]
-name = "enumflags2"
-version = "0.7.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e75d4cd21b95383444831539909fbb14b9dc3fdceb2a6f5d36577329a1f55ccb"
-dependencies = [
- "enumflags2_derive",
-]
-
-[[package]]
-name = "enumflags2_derive"
-version = "0.7.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f58dc3c5e468259f19f2d46304a6b28f1c3d034442e14b322d2b850e36f6d5ae"
-dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -2531,15 +1946,6 @@ dependencies = [
"url",
]
-[[package]]
-name = "erased-serde"
-version = "0.3.21"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81d013529d5574a60caeda29e179e695125448e5de52e3874f7b4c1d7360e18e"
-dependencies = [
- "serde",
-]
-
[[package]]
name = "errno"
version = "0.2.8"
@@ -2567,6 +1973,12 @@ version = "2.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71"
+[[package]]
+name = "fallible-iterator"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
+
[[package]]
name = "fastrand"
version = "1.7.0"
@@ -2577,33 +1989,13 @@ dependencies = [
]
[[package]]
-name = "femme"
-version = "2.2.1"
+name = "file-per-thread-logger"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc04871e5ae3aa2952d552dae6b291b3099723bf779a8054281c1366a54613ef"
+checksum = "21e16290574b39ee41c71aeb90ae960c504ebaf1e2a1c87bd52aa56ed6e1a02f"
dependencies = [
- "cfg-if 1.0.0",
- "js-sys",
+ "env_logger",
"log",
- "serde",
- "serde_derive",
- "serde_json",
- "wasm-bindgen",
- "web-sys",
-]
-
-[[package]]
-name = "figment"
-version = "0.10.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "790b4292c72618abbab50f787a477014fe15634f96291de45672ce46afe122df"
-dependencies = [
- "atomic",
- "pear",
- "serde",
- "toml",
- "uncased",
- "version_check",
]
[[package]]
@@ -2684,10 +2076,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b5dd19b048b2dfde153588594b4f3da47b18afd18d171bb8d1d27741256bbaa"
[[package]]
-name = "fuchsia-cprng"
-version = "0.1.1"
+name = "fs-set-times"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
+checksum = "e25ca26b0001154679ce0901527330e6153b670d17ccd1f86bab4e45dfba1a74"
+dependencies = [
+ "io-lifetimes",
+ "rustix",
+ "windows-sys 0.42.0",
+]
[[package]]
name = "futures"
@@ -2748,30 +2145,15 @@ version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb"
-[[package]]
-name = "futures-lite"
-version = "1.12.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48"
-dependencies = [
- "fastrand",
- "futures-core",
- "futures-io",
- "memchr",
- "parking",
- "pin-project-lite 0.2.9",
- "waker-fn",
-]
-
[[package]]
name = "futures-macro"
version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -2799,7 +2181,7 @@ dependencies = [
"futures-sink",
"futures-task",
"memchr",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"pin-utils",
"slab",
]
@@ -2824,16 +2206,12 @@ dependencies = [
]
[[package]]
-name = "generator"
-version = "0.7.0"
+name = "fxhash"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1d9279ca822891c1a4dae06d185612cf8fc6acfe5dff37781b41297811b12ee"
+checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
dependencies = [
- "cc",
- "libc",
- "log",
- "rustversion",
- "winapi",
+ "byteorder",
]
[[package]]
@@ -2846,17 +2224,6 @@ dependencies = [
"version_check",
]
-[[package]]
-name = "getrandom"
-version = "0.1.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
-dependencies = [
- "cfg-if 1.0.0",
- "libc",
- "wasi 0.9.0+wasi-snapshot-preview1",
-]
-
[[package]]
name = "getrandom"
version = "0.2.7"
@@ -2865,27 +2232,18 @@ checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6"
dependencies = [
"cfg-if 1.0.0",
"libc",
- "wasi 0.11.0+wasi-snapshot-preview1",
-]
-
-[[package]]
-name = "ghash"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375"
-dependencies = [
- "opaque-debug",
- "polyval 0.4.5",
+ "wasi",
]
[[package]]
-name = "ghash"
-version = "0.4.4"
+name = "gimli"
+version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99"
+checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d"
dependencies = [
- "opaque-debug",
- "polyval 0.5.3",
+ "fallible-iterator",
+ "indexmap",
+ "stable_deref_trait",
]
[[package]]
@@ -2934,34 +2292,22 @@ dependencies = [
"regex",
]
-[[package]]
-name = "gloo-timers"
-version = "0.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5fb7d06c1c8cc2a29bee7ec961009a0b2caa0793ee4900c2ffb348734ba1c8f9"
-dependencies = [
- "futures-channel",
- "futures-core",
- "js-sys",
- "wasm-bindgen",
-]
-
[[package]]
name = "h2"
version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57"
dependencies = [
- "bytes 1.3.0",
+ "bytes",
"fnv",
"futures-core",
"futures-sink",
"futures-util",
- "http 0.2.8",
+ "http",
"indexmap",
"slab",
"tokio",
- "tokio-util 0.7.3",
+ "tokio-util",
"tracing",
]
@@ -2989,14 +2335,14 @@ version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584"
dependencies = [
- "base64 0.13.1",
+ "base64",
"bitflags",
- "bytes 1.3.0",
+ "bytes",
"headers-core",
- "http 0.2.8",
+ "http",
"httpdate",
"mime",
- "sha1 0.10.4",
+ "sha1",
]
[[package]]
@@ -3005,7 +2351,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429"
dependencies = [
- "http 0.2.8",
+ "http",
]
[[package]]
@@ -3050,16 +2396,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "hkdf"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f"
-dependencies = [
- "digest 0.9.0",
- "hmac 0.10.1",
-]
-
[[package]]
name = "hkdf"
version = "0.12.3"
@@ -3069,26 +2405,6 @@ dependencies = [
"hmac 0.12.1",
]
-[[package]]
-name = "hmac"
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840"
-dependencies = [
- "crypto-mac 0.8.0",
- "digest 0.9.0",
-]
-
-[[package]]
-name = "hmac"
-version = "0.10.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15"
-dependencies = [
- "crypto-mac 0.10.1",
- "digest 0.9.0",
-]
-
[[package]]
name = "hmac"
version = "0.11.0"
@@ -3123,20 +2439,9 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
dependencies = [
- "libc",
- "match_cfg",
- "winapi",
-]
-
-[[package]]
-name = "http"
-version = "0.1.21"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0"
-dependencies = [
- "bytes 0.4.12",
- "fnv",
- "itoa 0.4.8",
+ "libc",
+ "match_cfg",
+ "winapi",
]
[[package]]
@@ -3145,9 +2450,9 @@ version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399"
dependencies = [
- "bytes 1.3.0",
+ "bytes",
"fnv",
- "itoa 1.0.2",
+ "itoa",
]
[[package]]
@@ -3156,21 +2461,9 @@ version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
dependencies = [
- "bytes 1.3.0",
- "http 0.2.8",
- "pin-project-lite 0.2.9",
-]
-
-[[package]]
-name = "http-client"
-version = "6.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1947510dc91e2bf586ea5ffb412caad7673264e14bb39fb9078da114a94ce1a5"
-dependencies = [
- "async-trait",
- "cfg-if 1.0.0",
- "http-types",
- "log",
+ "bytes",
+ "http",
+ "pin-project-lite",
]
[[package]]
@@ -3180,25 +2473,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29"
[[package]]
-name = "http-types"
-version = "2.12.0"
+name = "http-serde"
+version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad"
+checksum = "0e272971f774ba29341db2f686255ff8a979365a26fb9e4277f6b6d9ec0cdd5e"
dependencies = [
- "anyhow",
- "async-channel",
- "async-std",
- "base64 0.13.1",
- "cookie 0.14.4",
- "futures-lite",
- "infer",
- "pin-project-lite 0.2.9",
- "rand 0.7.3",
+ "http",
"serde",
- "serde_json",
- "serde_qs",
- "serde_urlencoded",
- "url",
]
[[package]]
@@ -3225,17 +2506,17 @@ version = "0.14.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c"
dependencies = [
- "bytes 1.3.0",
+ "bytes",
"futures-channel",
"futures-core",
"futures-util",
"h2",
- "http 0.2.8",
+ "http",
"http-body",
"httparse",
"httpdate",
- "itoa 1.0.2",
- "pin-project-lite 0.2.9",
+ "itoa",
+ "pin-project-lite",
"socket2",
"tokio",
"tower-service",
@@ -3271,7 +2552,7 @@ version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac"
dependencies = [
- "http 0.2.8",
+ "http",
"hyper",
"log",
"rustls",
@@ -3287,7 +2568,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1"
dependencies = [
"hyper",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"tokio",
"tokio-io-timeout",
]
@@ -3298,7 +2579,7 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
dependencies = [
- "bytes 1.3.0",
+ "bytes",
"hyper",
"native-tls",
"tokio",
@@ -3383,7 +2664,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af1955a75fa080c677d3972822ec4bad316169ab1cfc6c257a942c2265dbe5fe"
dependencies = [
"bitmaps",
- "rand_core 0.6.3",
+ "rand_core",
"rand_xoshiro",
"sized-chunks",
"typenum",
@@ -3396,7 +2677,7 @@ version = "1.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
"hashbrown",
"serde",
]
@@ -3419,18 +2700,6 @@ version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adab1eaa3408fb7f0c777a73e7465fd5656136fc93b670eb6df3c88c2c1344e3"
-[[package]]
-name = "infer"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac"
-
-[[package]]
-name = "inlinable_string"
-version = "0.1.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb"
-
[[package]]
name = "instant"
version = "0.1.12"
@@ -3446,7 +2715,7 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4c6a5dc426fcc25b99d91e4a283a8f5518339a0f63bf28588a6c5f31e089f8a"
dependencies = [
- "base64 0.13.1",
+ "base64",
"hyper",
"hyper-rustls",
"ring",
@@ -3456,22 +2725,23 @@ dependencies = [
]
[[package]]
-name = "io-lifetimes"
-version = "1.0.3"
+name = "io-extras"
+version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c"
+checksum = "b87bc110777311d7832025f38c4ab0f089f764644009edef3b5cbadfedee8c40"
dependencies = [
- "libc",
+ "io-lifetimes",
"windows-sys 0.42.0",
]
[[package]]
-name = "iovec"
-version = "0.1.4"
+name = "io-lifetimes"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
+checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c"
dependencies = [
"libc",
+ "windows-sys 0.42.0",
]
[[package]]
@@ -3515,15 +2785,29 @@ dependencies = [
[[package]]
name = "itoa"
-version = "0.4.8"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
+checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d"
[[package]]
-name = "itoa"
-version = "1.0.2"
+name = "ittapi"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d"
+checksum = "e8c4f6ff06169ce7048dac5150b1501c7e3716a929721aeb06b87e51a43e42f4"
+dependencies = [
+ "anyhow",
+ "ittapi-sys",
+ "log",
+]
+
+[[package]]
+name = "ittapi-sys"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87e078cce01485f418bae3beb34dd604aaedf2065502853c7da17fbce8e64eda"
+dependencies = [
+ "cc",
+]
[[package]]
name = "jni"
@@ -3569,7 +2853,7 @@ version = "8.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09f4f04699947111ec1733e71778d763555737579e44b85844cae8e1940a1828"
dependencies = [
- "base64 0.13.1",
+ "base64",
"pem",
"ring",
"serde",
@@ -3586,21 +2870,6 @@ dependencies = [
"static_assertions",
]
-[[package]]
-name = "kv-log-macro"
-version = "1.0.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f"
-dependencies = [
- "log",
-]
-
-[[package]]
-name = "language-tags"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388"
-
[[package]]
name = "lazy_static"
version = "1.4.0"
@@ -3613,6 +2882,12 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
+[[package]]
+name = "leb128"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
+
[[package]]
name = "libc"
version = "0.2.137"
@@ -3633,16 +2908,6 @@ dependencies = [
"pkg-config",
]
-[[package]]
-name = "libloading"
-version = "0.7.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
-dependencies = [
- "cfg-if 1.0.0",
- "winapi",
-]
-
[[package]]
name = "libnghttp2-sys"
version = "0.1.7+1.45.0"
@@ -3702,31 +2967,13 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f"
-[[package]]
-name = "local-channel"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f303ec0e94c6c54447f84f3b0ef7af769858a9c4ef56ef2a986d3dcd4c3fc9c"
-dependencies = [
- "futures-core",
- "futures-sink",
- "futures-util",
- "local-waker",
-]
-
-[[package]]
-name = "local-waker"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e34f76eb3611940e0e7d53a9aaa4e6a3151f69541a282fd0dad5571420c53ff1"
-
[[package]]
name = "lock_api"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
"scopeguard",
]
@@ -3737,32 +2984,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
dependencies = [
"cfg-if 1.0.0",
- "serde",
- "value-bag",
]
[[package]]
-name = "loom"
-version = "0.5.6"
+name = "lru-cache"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5"
+checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c"
dependencies = [
- "cfg-if 1.0.0",
- "generator",
- "scoped-tls",
- "serde",
- "serde_json",
- "tracing",
- "tracing-subscriber",
+ "linked-hash-map",
]
[[package]]
-name = "lru-cache"
-version = "0.1.2"
+name = "mach"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c"
+checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa"
dependencies = [
- "linked-hash-map",
+ "libc",
]
[[package]]
@@ -3801,6 +3040,12 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3dfc802da7b1cf80aefffa0c7b2f77247c8b32206cc83c270b61264f5b360a80"
+[[package]]
+name = "maybe-owned"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4"
+
[[package]]
name = "md-5"
version = "0.10.1"
@@ -3816,13 +3061,22 @@ version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+[[package]]
+name = "memfd"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb"
+dependencies = [
+ "rustix",
+]
+
[[package]]
name = "memoffset"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
]
[[package]]
@@ -3831,7 +3085,7 @@ version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
]
[[package]]
@@ -3873,7 +3127,7 @@ checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf"
dependencies = [
"libc",
"log",
- "wasi 0.11.0+wasi-snapshot-preview1",
+ "wasi",
"windows-sys 0.36.1",
]
@@ -3893,7 +3147,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a37fe10c1485a0cd603468e284a1a8535b4ecf46808f5f7de3639a1e1252dbf8"
dependencies = [
"async-trait",
- "base64 0.13.1",
+ "base64",
"bitflags",
"bson",
"chrono",
@@ -3909,10 +3163,10 @@ dependencies = [
"md-5",
"pbkdf2",
"percent-encoding",
- "rand 0.8.5",
+ "rand",
"rustc_version_runtime",
"rustls",
- "rustls-pemfile 1.0.1",
+ "rustls-pemfile",
"serde",
"serde_bytes",
"serde_with",
@@ -3925,60 +3179,19 @@ dependencies = [
"thiserror",
"tokio",
"tokio-rustls",
- "tokio-util 0.7.3",
+ "tokio-util",
"trust-dns-proto",
"trust-dns-resolver",
"typed-builder",
- "uuid 1.2.2",
+ "uuid",
"webpki-roots",
]
-[[package]]
-name = "multer"
-version = "2.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f8f35e687561d5c1667590911e6698a8cb714a134a7505718a182e7bc9d3836"
-dependencies = [
- "bytes 1.3.0",
- "encoding_rs",
- "futures-util",
- "http 0.2.8",
- "httparse",
- "log",
- "memchr",
- "mime",
- "spin 0.9.3",
- "tokio",
- "tokio-util 0.6.10",
- "version_check",
-]
-
[[package]]
name = "multimap"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "multipart"
-version = "0.18.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00dec633863867f29cb39df64a397cdf4a6354708ddd7759f70c7fb51c5f9182"
-dependencies = [
- "buf_redux",
- "httparse",
- "log",
- "mime",
- "mime_guess",
- "quick-error",
- "rand 0.8.5",
- "safemem",
- "tempfile",
- "twoway",
-]
[[package]]
name = "native-tls"
@@ -4004,24 +3217,13 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
-[[package]]
-name = "net2"
-version = "0.2.37"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae"
-dependencies = [
- "cfg-if 0.1.10",
- "libc",
- "winapi",
-]
-
[[package]]
name = "nix"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb"
dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
"bitflags",
"cfg-if 1.0.0",
"libc",
@@ -4055,7 +3257,7 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
"num-integer",
"num-traits",
]
@@ -4066,7 +3268,7 @@ version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
"num-traits",
]
@@ -4076,7 +3278,7 @@ version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
]
[[package]]
@@ -4113,6 +3315,18 @@ dependencies = [
"malloc_buf",
]
+[[package]]
+name = "object"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53"
+dependencies = [
+ "crc32fast",
+ "hashbrown",
+ "indexmap",
+ "memchr",
+]
+
[[package]]
name = "once_cell"
version = "1.16.0"
@@ -4156,9 +3370,9 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -4182,7 +3396,7 @@ version = "0.9.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1"
dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
"cc",
"libc",
"openssl-src",
@@ -4207,8 +3421,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1edc79add46364183ece1a4542592ca593e6421c60807232f5b8f7a31703825d"
dependencies = [
"async-trait",
- "bytes 1.3.0",
- "http 0.2.8",
+ "bytes",
+ "http",
"opentelemetry_api",
]
@@ -4221,7 +3435,7 @@ dependencies = [
"async-trait",
"futures",
"futures-util",
- "http 0.2.8",
+ "http",
"opentelemetry",
"opentelemetry-proto",
"prost",
@@ -4256,7 +3470,7 @@ dependencies = [
"indexmap",
"js-sys",
"once_cell",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"thiserror",
]
@@ -4276,21 +3490,12 @@ dependencies = [
"once_cell",
"opentelemetry_api",
"percent-encoding",
- "rand 0.8.5",
+ "rand",
"thiserror",
"tokio",
"tokio-stream",
]
-[[package]]
-name = "ordered-float"
-version = "2.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87"
-dependencies = [
- "num-traits",
-]
-
[[package]]
name = "os_info"
version = "3.5.1"
@@ -4323,12 +3528,6 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
-[[package]]
-name = "parking"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72"
-
[[package]]
name = "parking_lot"
version = "0.11.2"
@@ -4398,36 +3597,13 @@ dependencies = [
"digest 0.10.3",
]
-[[package]]
-name = "pear"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15e44241c5e4c868e3eaa78b7c1848cadd6344ed4f54d029832d32b415a58702"
-dependencies = [
- "inlinable_string",
- "pear_codegen",
- "yansi",
-]
-
-[[package]]
-name = "pear_codegen"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82a5ca643c2303ecb740d506539deba189e16f2754040a42901cd8105d0282d0"
-dependencies = [
- "proc-macro2 1.0.47",
- "proc-macro2-diagnostics",
- "quote 1.0.21",
- "syn 1.0.104",
-]
-
[[package]]
name = "pem"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03c64931a1a212348ec4f3b4362585eca7159d0d09cbdf4a7f74f02173596fd4"
dependencies = [
- "base64 0.13.1",
+ "base64",
]
[[package]]
@@ -4461,152 +3637,37 @@ version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
-]
-
-[[package]]
-name = "pin-project-lite"
-version = "0.1.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777"
-
-[[package]]
-name = "pin-project-lite"
-version = "0.2.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
-
-[[package]]
-name = "pin-utils"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
-
-[[package]]
-name = "pipe"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c7b8f27da217eb966df4c58d4159ea939431950ca03cf782c22bd7c5c1d8d75"
-dependencies = [
- "crossbeam-channel",
-]
-
-[[package]]
-name = "pkg-config"
-version = "0.3.25"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
-
-[[package]]
-name = "poem"
-version = "1.3.49"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc88a96f338947991534ac756e28bd05665a7dd40ad9c0c143cc5503ef5635e8"
-dependencies = [
- "async-trait",
- "bytes 1.3.0",
- "futures-util",
- "headers",
- "http 0.2.8",
- "hyper",
- "mime",
- "parking_lot 0.12.1",
- "percent-encoding",
- "pin-project-lite 0.2.9",
- "poem-derive",
- "regex",
- "rfc7239",
- "serde",
- "serde_json",
- "serde_urlencoded",
- "smallvec",
- "thiserror",
- "tokio",
- "tokio-stream",
- "tokio-util 0.7.3",
- "tracing",
-]
-
-[[package]]
-name = "poem-derive"
-version = "1.3.49"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9bfb3ddf3eb162c2a2dc4dbdc610eaf56417cd4000fcda2686ccb354e2a1b2b"
-dependencies = [
- "proc-macro-crate",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
-name = "poise"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ca787e4e516076de1995a83ee05fbdfed71d072ea0da3df018318db42a87803"
-dependencies = [
- "async-trait",
- "derivative",
- "futures-core",
- "futures-util",
- "log",
- "once_cell",
- "parking_lot 0.12.1",
- "poise_macros",
- "regex",
- "serenity",
- "tokio",
-]
-
-[[package]]
-name = "poise_macros"
-version = "0.5.2"
+name = "pin-project-lite"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b80c1f4e04114527f9d41ed6bb31707a095276f51bb0aef3ca11f062b25a67c4"
-dependencies = [
- "darling 0.14.1",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
-]
+checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
[[package]]
-name = "polling"
-version = "2.2.0"
+name = "pin-utils"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259"
-dependencies = [
- "cfg-if 1.0.0",
- "libc",
- "log",
- "wepoll-ffi",
- "winapi",
-]
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
-name = "polyval"
-version = "0.4.5"
+name = "pipe"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd"
+checksum = "1c7b8f27da217eb966df4c58d4159ea939431950ca03cf782c22bd7c5c1d8d75"
dependencies = [
- "cpuid-bool",
- "opaque-debug",
- "universal-hash",
+ "crossbeam-channel",
]
[[package]]
-name = "polyval"
-version = "0.5.3"
+name = "pkg-config"
+version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1"
-dependencies = [
- "cfg-if 1.0.0",
- "cpufeatures",
- "opaque-debug",
- "universal-hash",
-]
+checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
[[package]]
name = "portable-atomic"
@@ -4620,7 +3681,7 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9"
dependencies = [
- "rand 0.8.5",
+ "rand",
]
[[package]]
@@ -4674,18 +3735,8 @@ version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e1516508b396cefe095485fdce673007422f5e48e82934b7b423dc26aa5e6a4"
dependencies = [
- "proc-macro2 1.0.47",
- "syn 1.0.104",
-]
-
-[[package]]
-name = "proc-macro-crate"
-version = "1.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a"
-dependencies = [
- "thiserror",
- "toml",
+ "proc-macro2",
+ "syn",
]
[[package]]
@@ -4695,9 +3746,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [
"proc-macro-error-attr",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "proc-macro2",
+ "quote",
+ "syn",
"version_check",
]
@@ -4707,26 +3758,11 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
+ "proc-macro2",
+ "quote",
"version_check",
]
-[[package]]
-name = "proc-macro-hack"
-version = "0.5.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
-
-[[package]]
-name = "proc-macro2"
-version = "0.4.30"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
-dependencies = [
- "unicode-xid 0.1.0",
-]
-
[[package]]
name = "proc-macro2"
version = "1.0.47"
@@ -4736,26 +3772,13 @@ dependencies = [
"unicode-ident",
]
-[[package]]
-name = "proc-macro2-diagnostics"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada"
-dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
- "version_check",
- "yansi",
-]
-
[[package]]
name = "prost"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0841812012b2d4a6145fae9a6af1534873c32aa67fff26bd09f8fa42c83f95a"
dependencies = [
- "bytes 1.3.0",
+ "bytes",
"prost-derive",
]
@@ -4765,7 +3788,7 @@ version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d8b442418ea0822409d9e7d047cbf1e7e9e1760b172bf9982cf29d517c93511"
dependencies = [
- "bytes 1.3.0",
+ "bytes",
"heck",
"itertools",
"lazy_static",
@@ -4776,7 +3799,7 @@ dependencies = [
"prost",
"prost-types",
"regex",
- "syn 1.0.104",
+ "syn",
"tempfile",
"which",
]
@@ -4789,9 +3812,9 @@ checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364"
dependencies = [
"anyhow",
"itertools",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -4800,10 +3823,19 @@ version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4dfaa718ad76a44b3415e6c4d53b17c8f99160dcb3a99b10470fce8ad43f6e3e"
dependencies = [
- "bytes 1.3.0",
+ "bytes",
"prost",
]
+[[package]]
+name = "psm"
+version = "0.1.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874"
+dependencies = [
+ "cc",
+]
+
[[package]]
name = "queues"
version = "1.1.0"
@@ -4816,54 +3848,13 @@ version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
-[[package]]
-name = "quote"
-version = "0.6.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
-dependencies = [
- "proc-macro2 0.4.30",
-]
-
[[package]]
name = "quote"
version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
dependencies = [
- "proc-macro2 1.0.47",
-]
-
-[[package]]
-name = "rand"
-version = "0.6.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca"
-dependencies = [
- "autocfg 0.1.8",
- "libc",
- "rand_chacha 0.1.1",
- "rand_core 0.4.2",
- "rand_hc 0.1.0",
- "rand_isaac",
- "rand_jitter",
- "rand_os",
- "rand_pcg",
- "rand_xorshift",
- "winapi",
-]
-
-[[package]]
-name = "rand"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
-dependencies = [
- "getrandom 0.1.16",
- "libc",
- "rand_chacha 0.2.2",
- "rand_core 0.5.1",
- "rand_hc 0.2.0",
+ "proc-macro2",
]
[[package]]
@@ -4873,28 +3864,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
- "rand_chacha 0.3.1",
- "rand_core 0.6.3",
-]
-
-[[package]]
-name = "rand_chacha"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef"
-dependencies = [
- "autocfg 0.1.8",
- "rand_core 0.3.1",
-]
-
-[[package]]
-name = "rand_chacha"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
-dependencies = [
- "ppv-lite86",
- "rand_core 0.5.1",
+ "rand_chacha",
+ "rand_core",
]
[[package]]
@@ -4904,31 +3875,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
- "rand_core 0.6.3",
-]
-
-[[package]]
-name = "rand_core"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
-dependencies = [
- "rand_core 0.4.2",
-]
-
-[[package]]
-name = "rand_core"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
-
-[[package]]
-name = "rand_core"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
-dependencies = [
- "getrandom 0.1.16",
+ "rand_core",
]
[[package]]
@@ -4937,78 +3884,7 @@ version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
dependencies = [
- "getrandom 0.2.7",
-]
-
-[[package]]
-name = "rand_hc"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4"
-dependencies = [
- "rand_core 0.3.1",
-]
-
-[[package]]
-name = "rand_hc"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
-dependencies = [
- "rand_core 0.5.1",
-]
-
-[[package]]
-name = "rand_isaac"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08"
-dependencies = [
- "rand_core 0.3.1",
-]
-
-[[package]]
-name = "rand_jitter"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b"
-dependencies = [
- "libc",
- "rand_core 0.4.2",
- "winapi",
-]
-
-[[package]]
-name = "rand_os"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
-dependencies = [
- "cloudabi",
- "fuchsia-cprng",
- "libc",
- "rand_core 0.4.2",
- "rdrand",
- "winapi",
-]
-
-[[package]]
-name = "rand_pcg"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44"
-dependencies = [
- "autocfg 0.1.8",
- "rand_core 0.4.2",
-]
-
-[[package]]
-name = "rand_xorshift"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c"
-dependencies = [
- "rand_core 0.3.1",
+ "getrandom",
]
[[package]]
@@ -5017,7 +3893,7 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa"
dependencies = [
- "rand_core 0.6.3",
+ "rand_core",
]
[[package]]
@@ -5060,19 +3936,10 @@ checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b"
dependencies = [
"pem",
"ring",
- "time 0.3.11",
+ "time",
"yasna",
]
-[[package]]
-name = "rdrand"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
-dependencies = [
- "rand_core 0.3.1",
-]
-
[[package]]
name = "redox_syscall"
version = "0.2.13"
@@ -5088,29 +3955,21 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
dependencies = [
- "getrandom 0.2.7",
+ "getrandom",
"redox_syscall",
"thiserror",
]
[[package]]
-name = "ref-cast"
-version = "1.0.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "685d58625b6c2b83e4cc88a27c4bf65adb7b6b16dbdc413e515c9405b47432ab"
-dependencies = [
- "ref-cast-impl",
-]
-
-[[package]]
-name = "ref-cast-impl"
-version = "1.0.7"
+name = "regalloc2"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a043824e29c94169374ac5183ac0ed43f5724dc4556b19568007486bd840fa1f"
+checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "fxhash",
+ "log",
+ "slice-group-by",
+ "smallvec",
]
[[package]]
@@ -5154,13 +4013,13 @@ version = "0.11.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c"
dependencies = [
- "base64 0.13.1",
- "bytes 1.3.0",
+ "base64",
+ "bytes",
"encoding_rs",
"futures-core",
"futures-util",
"h2",
- "http 0.2.8",
+ "http",
"http-body",
"hyper",
"hyper-rustls",
@@ -5173,16 +4032,15 @@ dependencies = [
"native-tls",
"once_cell",
"percent-encoding",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"rustls",
- "rustls-pemfile 1.0.1",
+ "rustls-pemfile",
"serde",
"serde_json",
"serde_urlencoded",
"tokio",
"tokio-native-tls",
"tokio-rustls",
- "tokio-util 0.7.3",
"tower-service",
"url",
"wasm-bindgen",
@@ -5200,7 +4058,7 @@ checksum = "4a1c03e9011a8c59716ad13115550469e081e2e9892656b0ba6a47c907921894"
dependencies = [
"anyhow",
"async-trait",
- "http 0.2.8",
+ "http",
"reqwest",
"serde",
"task-local-extensions",
@@ -5217,7 +4075,7 @@ dependencies = [
"async-trait",
"chrono",
"futures",
- "http 0.2.8",
+ "http",
"hyper",
"reqwest",
"reqwest-middleware",
@@ -5245,7 +4103,7 @@ checksum = "47f9e19b18c6cdd796cc70aea8a9ea5ee7b813be611c6589e3624fcdbfd05f9d"
dependencies = [
"anyhow",
"chrono",
- "rand 0.8.5",
+ "rand",
]
[[package]]
@@ -5261,15 +4119,6 @@ dependencies = [
"thiserror",
]
-[[package]]
-name = "rfc7239"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "087317b3cf7eb481f13bd9025d729324b7cd068d6f470e2d76d049e191f5ba47"
-dependencies = [
- "uncased",
-]
-
[[package]]
name = "ring"
version = "0.16.20"
@@ -5286,91 +4135,32 @@ dependencies = [
]
[[package]]
-name = "rocket"
-version = "0.5.0-rc.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "98ead083fce4a405feb349cf09abdf64471c6077f14e0ce59364aa90d4b99317"
-dependencies = [
- "async-stream",
- "async-trait",
- "atomic",
- "atty",
- "binascii",
- "bytes 1.3.0",
- "either",
- "figment",
- "futures",
- "indexmap",
- "log",
- "memchr",
- "multer",
- "num_cpus",
- "parking_lot 0.12.1",
- "pin-project-lite 0.2.9",
- "rand 0.8.5",
- "ref-cast",
- "rocket_codegen",
- "rocket_http",
- "serde",
- "state",
- "tempfile",
- "time 0.3.11",
- "tokio",
- "tokio-stream",
- "tokio-util 0.7.3",
- "ubyte",
- "version_check",
- "yansi",
-]
-
-[[package]]
-name = "rocket_codegen"
-version = "0.5.0-rc.2"
+name = "rmp"
+version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6aeb6bb9c61e9cd2c00d70ea267bf36f76a4cc615e5908b349c2f9d93999b47"
+checksum = "44519172358fd6d58656c86ab8e7fbc9e1490c3e8f14d35ed78ca0dd07403c9f"
dependencies = [
- "devise",
- "glob",
- "indexmap",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "rocket_http",
- "syn 1.0.104",
- "unicode-xid 0.2.3",
+ "byteorder",
+ "num-traits",
+ "paste",
]
[[package]]
-name = "rocket_http"
-version = "0.5.0-rc.2"
+name = "rmp-serde"
+version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ded65d127954de3c12471630bf4b81a2792f065984461e65b91d0fdaafc17a2"
+checksum = "c5b13be192e0220b8afb7222aa5813cb62cc269ebb5cac346ca6487681d2913e"
dependencies = [
- "cookie 0.16.0",
- "either",
- "futures",
- "http 0.2.8",
- "hyper",
- "indexmap",
- "log",
- "memchr",
- "pear",
- "percent-encoding",
- "pin-project-lite 0.2.9",
- "ref-cast",
+ "byteorder",
+ "rmp",
"serde",
- "smallvec",
- "stable-pattern",
- "state",
- "time 0.3.11",
- "tokio",
- "uncased",
]
[[package]]
-name = "route-recognizer"
-version = "0.2.0"
+name = "rustc-demangle"
+version = "0.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56770675ebc04927ded3e60633437841581c285dc6236109ea25fbf3beb7b59e"
+checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
[[package]]
name = "rustc-hash"
@@ -5399,7 +4189,7 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
- "semver 1.0.14",
+ "semver 1.0.16",
]
[[package]]
@@ -5433,8 +4223,10 @@ dependencies = [
"bitflags",
"errno",
"io-lifetimes",
+ "itoa",
"libc",
"linux-raw-sys",
+ "once_cell",
"windows-sys 0.42.0",
]
@@ -5457,27 +4249,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50"
dependencies = [
"openssl-probe",
- "rustls-pemfile 1.0.1",
+ "rustls-pemfile",
"schannel",
"security-framework",
]
-[[package]]
-name = "rustls-pemfile"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9"
-dependencies = [
- "base64 0.13.1",
-]
-
[[package]]
name = "rustls-pemfile"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55"
dependencies = [
- "base64 0.13.1",
+ "base64",
]
[[package]]
@@ -5493,91 +4276,20 @@ dependencies = [
"rustc-hash",
"strsim",
"unicode-normalization",
- "unicode_categories",
-]
-
-[[package]]
-name = "rustversion"
-version = "1.0.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8"
-
-[[package]]
-name = "ryu"
-version = "1.0.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695"
-
-[[package]]
-name = "safemem"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072"
-
-[[package]]
-name = "salvo"
-version = "0.37.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b290f01b3b881afd34408b5823cb44f6717ed6b93a6e16a0113e9a49645ea8a7"
-dependencies = [
- "salvo_core",
+ "unicode_categories",
]
[[package]]
-name = "salvo_core"
-version = "0.37.5"
+name = "rustversion"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2fea63014bacaaaef1eaa1f28d90921cfbbee73a379974fca30fc698f64a8853"
-dependencies = [
- "async-compression",
- "async-trait",
- "base64 0.13.1",
- "bytes 1.3.0",
- "cookie 0.16.0",
- "cruet",
- "encoding_rs",
- "enumflags2",
- "fastrand",
- "form_urlencoded",
- "futures-util",
- "headers",
- "http 0.2.8",
- "hyper",
- "mime",
- "mime_guess",
- "multer",
- "multimap",
- "once_cell",
- "parking_lot 0.12.1",
- "percent-encoding",
- "regex",
- "salvo_macros",
- "serde",
- "serde_json",
- "serde_urlencoded",
- "tempfile",
- "textnonce",
- "thiserror",
- "tokio",
- "tokio-stream",
- "tracing",
- "url",
-]
+checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8"
[[package]]
-name = "salvo_macros"
-version = "0.37.5"
+name = "ryu"
+version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b305a54f28b92483eabbfc91dd39bba62c840095b5513e83d31582c7e6bd8d44"
-dependencies = [
- "cruet",
- "darling 0.14.1",
- "proc-macro-crate",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "regex",
- "syn 1.0.104",
-]
+checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695"
[[package]]
name = "same-file"
@@ -5598,12 +4310,6 @@ dependencies = [
"windows-sys 0.36.1",
]
-[[package]]
-name = "scoped-tls"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"
-
[[package]]
name = "scopeguard"
version = "1.1.0"
@@ -5654,9 +4360,9 @@ dependencies = [
[[package]]
name = "semver"
-version = "1.0.14"
+version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4"
+checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a"
dependencies = [
"serde",
]
@@ -5676,16 +4382,6 @@ dependencies = [
"serde_derive",
]
-[[package]]
-name = "serde-value"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c"
-dependencies = [
- "ordered-float",
- "serde",
-]
-
[[package]]
name = "serde_bytes"
version = "0.11.7"
@@ -5701,18 +4397,9 @@ version = "1.0.148"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a55492425aa53521babf6137309e7d34c20bbfbbfcfe2c7f3a047fd1f6b92c0c"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
-]
-
-[[package]]
-name = "serde_fmt"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2963a69a2b3918c1dc75a45a18bd3fcd1120e31d3f59deb1b2f9b5d5ffb8baa4"
-dependencies = [
- "serde",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -5731,7 +4418,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db"
dependencies = [
"indexmap",
- "itoa 1.0.2",
+ "itoa",
"ryu",
"serde",
]
@@ -5745,17 +4432,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "serde_qs"
-version = "0.8.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7715380eec75f029a4ef7de39a9200e0a63823176b759d055b613f5a87df6a6"
-dependencies = [
- "percent-encoding",
- "serde",
- "thiserror",
-]
-
[[package]]
name = "serde_urlencoded"
version = "0.7.1"
@@ -5763,7 +4439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
dependencies = [
"form_urlencoded",
- "itoa 1.0.2",
+ "itoa",
"ryu",
"serde",
]
@@ -5784,42 +4460,10 @@ version = "1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082"
dependencies = [
- "darling 0.13.4",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
-]
-
-[[package]]
-name = "serenity"
-version = "0.11.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82fd5e7b5858ad96e99d440138f34f5b98e1b959ebcd3a1036203b30e78eb788"
-dependencies = [
- "async-trait",
- "async-tungstenite",
- "base64 0.13.1",
- "bitflags",
- "bytes 1.3.0",
- "cfg-if 1.0.0",
- "chrono",
- "dashmap",
- "flate2",
- "futures",
- "mime",
- "mime_guess",
- "parking_lot 0.12.1",
- "percent-encoding",
- "reqwest",
- "rustversion",
- "serde",
- "serde-value",
- "serde_json",
- "time 0.3.11",
- "tokio",
- "tracing",
- "typemap_rev",
- "url",
+ "darling",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -5833,15 +4477,6 @@ dependencies = [
"digest 0.10.3",
]
-[[package]]
-name = "sha1"
-version = "0.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770"
-dependencies = [
- "sha1_smol",
-]
-
[[package]]
name = "sha1"
version = "0.10.4"
@@ -5853,12 +4488,6 @@ dependencies = [
"digest 0.10.3",
]
-[[package]]
-name = "sha1_smol"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012"
-
[[package]]
name = "sha2"
version = "0.9.9"
@@ -5898,9 +4527,18 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f"
+[[package]]
+name = "shellexpand"
+version = "2.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ccc8076840c4da029af4f87e4e8daeb0fca6b87bbb02e10cb60b791450e11e4"
+dependencies = [
+ "dirs",
+]
+
[[package]]
name = "shuttle-admin"
-version = "0.11.0"
+version = "0.12.0"
dependencies = [
"anyhow",
"clap 4.0.27",
@@ -5917,7 +4555,7 @@ dependencies = [
[[package]]
name = "shuttle-auth"
-version = "0.11.0"
+version = "0.12.0"
dependencies = [
"anyhow",
"async-trait",
@@ -5925,11 +4563,11 @@ dependencies = [
"axum-extra 0.5.0",
"axum-sessions",
"clap 4.0.27",
- "http 0.2.8",
+ "http",
"hyper",
"jsonwebtoken",
"opentelemetry",
- "rand 0.8.5",
+ "rand",
"ring",
"serde",
"serde_json",
@@ -5946,31 +4584,33 @@ dependencies = [
[[package]]
name = "shuttle-codegen"
-version = "0.11.0"
+version = "0.12.0"
dependencies = [
"pretty_assertions",
"proc-macro-error",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "proc-macro2",
+ "quote",
+ "syn",
"trybuild",
]
[[package]]
name = "shuttle-common"
-version = "0.11.2"
+version = "0.12.0"
dependencies = [
"anyhow",
"async-trait",
"axum",
- "base64 0.13.1",
- "bytes 1.3.0",
+ "base64",
+ "bytes",
+ "cap-std",
"chrono",
"comfy-table",
"crossterm",
"headers",
- "http 0.2.8",
+ "http",
"http-body",
+ "http-serde",
"hyper",
"jsonwebtoken",
"once_cell",
@@ -5978,8 +4618,10 @@ dependencies = [
"opentelemetry-http",
"opentelemetry-otlp",
"pin-project",
+ "prost-types",
"reqwest",
"ring",
+ "rmp-serde",
"rustrict",
"serde",
"serde_json",
@@ -5994,17 +4636,17 @@ dependencies = [
"tracing-opentelemetry",
"tracing-subscriber",
"ttl_cache",
- "uuid 1.2.2",
+ "uuid",
]
[[package]]
name = "shuttle-deployer"
-version = "0.11.1"
+version = "0.12.0"
dependencies = [
"anyhow",
"async-trait",
"axum",
- "bytes 1.3.0",
+ "bytes",
"cargo",
"cargo_metadata",
"chrono",
@@ -6015,6 +4657,7 @@ dependencies = [
"fqdn",
"futures",
"hex 0.4.3",
+ "home",
"hyper",
"hyper-reverse-proxy 0.5.2-dev (git+https://github.com/chesedo/hyper-reverse-proxy?branch=master)",
"once_cell",
@@ -6022,7 +4665,7 @@ dependencies = [
"opentelemetry-http",
"pipe",
"portpicker",
- "rand 0.8.5",
+ "rand",
"serde",
"serde_json",
"shuttle-common",
@@ -6037,29 +4680,30 @@ dependencies = [
"toml",
"tonic",
"tower",
+ "tower-http 0.3.5",
"tracing",
"tracing-opentelemetry",
"tracing-subscriber",
- "uuid 1.2.2",
+ "uuid",
]
[[package]]
name = "shuttle-gateway"
-version = "0.11.2"
+version = "0.12.0"
dependencies = [
"acme2",
"anyhow",
"async-trait",
"axum",
"axum-server",
- "base64 0.13.1",
+ "base64",
"bollard",
"chrono",
"clap 4.0.27",
"colored",
"fqdn",
"futures",
- "http 0.2.8",
+ "http",
"hyper",
"hyper-reverse-proxy 0.5.2-dev (git+https://github.com/chesedo/hyper-reverse-proxy?branch=bug/host_header)",
"instant-acme",
@@ -6072,11 +4716,11 @@ dependencies = [
"pem",
"pin-project",
"portpicker",
- "rand 0.8.5",
+ "rand",
"rcgen",
"ring",
"rustls",
- "rustls-pemfile 1.0.1",
+ "rustls-pemfile",
"serde",
"serde_json",
"shuttle-common",
@@ -6086,26 +4730,34 @@ dependencies = [
"tempfile",
"tokio",
"tower",
+ "tower-http 0.3.5",
"tracing",
"tracing-opentelemetry",
"tracing-subscriber",
"ttl_cache",
- "uuid 1.2.2",
+ "uuid",
]
[[package]]
name = "shuttle-proto"
-version = "0.11.0"
+version = "0.12.0"
dependencies = [
+ "anyhow",
+ "chrono",
+ "home",
"prost",
+ "prost-types",
"shuttle-common",
+ "tokio",
"tonic",
"tonic-build",
+ "tower",
+ "tracing",
]
[[package]]
name = "shuttle-provisioner"
-version = "0.11.0"
+version = "0.12.0"
dependencies = [
"aws-config",
"aws-sdk-rds",
@@ -6116,7 +4768,7 @@ dependencies = [
"once_cell",
"portpicker",
"prost",
- "rand 0.8.5",
+ "rand",
"serde_json",
"shuttle-common",
"shuttle-proto",
@@ -6130,54 +4782,62 @@ dependencies = [
]
[[package]]
-name = "shuttle-secrets"
-version = "0.11.0"
+name = "shuttle-runtime"
+version = "0.12.0"
dependencies = [
+ "anyhow",
"async-trait",
+ "cap-std",
+ "chrono",
+ "clap 4.0.27",
+ "crossbeam-channel",
+ "futures",
+ "hyper",
+ "portpicker",
+ "prost-types",
+ "rmp-serde",
+ "serde_json",
+ "shuttle-common",
+ "shuttle-proto",
"shuttle-service",
+ "strfmt",
+ "thiserror",
"tokio",
+ "tokio-stream",
+ "tonic",
+ "tower",
+ "tracing",
+ "tracing-subscriber",
+ "wasi-common",
+ "wasmtime",
+ "wasmtime-wasi",
+]
+
+[[package]]
+name = "shuttle-secrets"
+version = "0.12.0"
+dependencies = [
+ "async-trait",
+ "shuttle-service",
]
[[package]]
name = "shuttle-service"
-version = "0.11.0"
+version = "0.12.0"
dependencies = [
- "actix-web",
"anyhow",
- "async-std",
"async-trait",
- "axum",
- "bincode",
"cargo",
"cargo_metadata",
- "chrono",
"crossbeam-channel",
- "futures",
- "hyper",
- "libloading",
- "num_cpus",
"pipe",
- "poem",
- "poise",
- "portpicker",
- "rocket",
- "salvo",
"serde_json",
- "serenity",
"shuttle-codegen",
"shuttle-common",
- "sqlx",
"strfmt",
- "sync_wrapper",
"thiserror",
- "thruster",
- "tide",
"tokio",
- "tower",
"tracing",
- "tracing-subscriber",
- "uuid 1.2.2",
- "warp",
]
[[package]]
@@ -6210,15 +4870,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "simple-mutex"
-version = "1.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38aabbeafa6f6dead8cebf246fe9fae1f9215c8d29b3a69f93bd62a9e4a3dcd6"
-dependencies = [
- "event-listener",
-]
-
[[package]]
name = "simple_asn1"
version = "0.6.2"
@@ -6228,7 +4879,7 @@ dependencies = [
"num-bigint",
"num-traits",
"thiserror",
- "time 0.3.11",
+ "time",
]
[[package]]
@@ -6247,6 +4898,12 @@ version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32"
+[[package]]
+name = "slice-group-by"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec"
+
[[package]]
name = "smallvec"
version = "1.10.0"
@@ -6259,7 +4916,7 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29"
dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
"serde",
"static_assertions",
"version_check",
@@ -6340,10 +4997,10 @@ checksum = "dcbc16ddba161afc99e14d1713a453747a2b07fc097d2009f4c300ec99286105"
dependencies = [
"ahash",
"atoi",
- "base64 0.13.1",
+ "base64",
"bitflags",
"byteorder",
- "bytes 1.3.0",
+ "bytes",
"chrono",
"crc",
"crossbeam-queue",
@@ -6359,10 +5016,10 @@ dependencies = [
"futures-util",
"hashlink",
"hex 0.4.3",
- "hkdf 0.12.3",
+ "hkdf",
"hmac 0.12.1",
"indexmap",
- "itoa 1.0.2",
+ "itoa",
"libc",
"libsqlite3-sys",
"log",
@@ -6371,10 +5028,10 @@ dependencies = [
"once_cell",
"paste",
"percent-encoding",
- "rand 0.8.5",
+ "rand",
"serde",
"serde_json",
- "sha1 0.10.4",
+ "sha1",
"sha2 0.10.2",
"smallvec",
"sqlformat",
@@ -6383,7 +5040,7 @@ dependencies = [
"thiserror",
"tokio-stream",
"url",
- "uuid 1.2.2",
+ "uuid",
"whoami",
]
@@ -6397,13 +5054,13 @@ dependencies = [
"either",
"heck",
"once_cell",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
+ "proc-macro2",
+ "quote",
"serde_json",
"sha2 0.10.2",
"sqlx-core",
"sqlx-rt",
- "syn 1.0.104",
+ "syn",
"url",
]
@@ -6420,31 +5077,10 @@ dependencies = [
]
[[package]]
-name = "stable-pattern"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4564168c00635f88eaed410d5efa8131afa8d8699a612c80c455a0ba05c21045"
-dependencies = [
- "memchr",
-]
-
-[[package]]
-name = "standback"
-version = "0.2.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff"
-dependencies = [
- "version_check",
-]
-
-[[package]]
-name = "state"
-version = "0.5.3"
+name = "stable_deref_trait"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbe866e1e51e8260c9eed836a042a5e7f6726bb2b411dffeaa712e19c388f23b"
-dependencies = [
- "loom",
-]
+checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
[[package]]
name = "static_assertions"
@@ -6452,55 +5088,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
-[[package]]
-name = "stdweb"
-version = "0.4.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5"
-dependencies = [
- "discard",
- "rustc_version 0.2.3",
- "stdweb-derive",
- "stdweb-internal-macros",
- "stdweb-internal-runtime",
- "wasm-bindgen",
-]
-
-[[package]]
-name = "stdweb-derive"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef"
-dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "serde",
- "serde_derive",
- "syn 1.0.104",
-]
-
-[[package]]
-name = "stdweb-internal-macros"
-version = "0.2.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11"
-dependencies = [
- "base-x",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "serde",
- "serde_derive",
- "serde_json",
- "sha1 0.6.1",
- "syn 1.0.104",
-]
-
-[[package]]
-name = "stdweb-internal-runtime"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0"
-
[[package]]
name = "strfmt"
version = "0.2.2"
@@ -6548,10 +5135,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4faebde00e8ff94316c01800f9054fd2ba77d30d9e922541913051d1d978918b"
dependencies = [
"heck",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
+ "proc-macro2",
+ "quote",
"rustversion",
- "syn 1.0.104",
+ "syn",
]
[[package]]
@@ -6570,34 +5157,14 @@ version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
-[[package]]
-name = "sval"
-version = "1.0.0-alpha.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "45f6ee7c7b87caf59549e9fe45d6a69c75c8019e79e212a835c5da0e92f0ba08"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "syn"
-version = "0.15.44"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
-dependencies = [
- "proc-macro2 0.4.30",
- "quote 0.6.13",
- "unicode-xid 0.1.0",
-]
-
[[package]]
name = "syn"
version = "1.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ae548ec36cf198c0ef7710d3c230987c2d6d7bd98ad6edc0274462724c585ce"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
+ "proc-macro2",
+ "quote",
"unicode-ident",
]
@@ -6607,6 +5174,21 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8"
+[[package]]
+name = "system-interface"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77b5f685b54fe35201ca824534425d4af3562470fb67682cf20130c568b49042"
+dependencies = [
+ "bitflags",
+ "cap-fs-ext",
+ "cap-std",
+ "io-lifetimes",
+ "rustix",
+ "windows-sys 0.42.0",
+ "winx",
+]
+
[[package]]
name = "take_mut"
version = "0.2.2"
@@ -6624,6 +5206,12 @@ dependencies = [
"xattr",
]
+[[package]]
+name = "target-lexicon"
+version = "0.12.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1"
+
[[package]]
name = "task-local-extensions"
version = "0.1.1"
@@ -6647,15 +5235,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "templatify"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a528032d6917c9a80cf894d9feeffe34056e8d62d3492bbfc15abfdcfa8a8fe1"
-dependencies = [
- "bytes 0.4.12",
-]
-
[[package]]
name = "termcolor"
version = "1.1.3"
@@ -6704,22 +5283,12 @@ dependencies = [
[[package]]
name = "test-context-macros"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8901a55b0a7a06ebc4a674dcca925170da8e613fa3b163a1df804ed10afb154d"
-dependencies = [
- "quote 1.0.21",
- "syn 1.0.104",
-]
-
-[[package]]
-name = "textnonce"
-version = "1.0.0"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7743f8d70cd784ed1dc33106a18998d77758d281dc40dc3e6d050cf0f5286683"
+checksum = "8901a55b0a7a06ebc4a674dcca925170da8e613fa3b163a1df804ed10afb154d"
dependencies = [
- "base64 0.12.3",
- "rand 0.7.3",
+ "quote",
+ "syn",
]
[[package]]
@@ -6743,9 +5312,9 @@ version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -6757,121 +5326,16 @@ dependencies = [
"once_cell",
]
-[[package]]
-name = "thruster"
-version = "1.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "910effe6fa8063f44f9f2f4d15d758270a679562414235c6781bf3b606b72682"
-dependencies = [
- "async-trait",
- "bytes 0.5.6",
- "bytes 1.3.0",
- "fnv",
- "futures",
- "http 0.1.21",
- "http 0.2.8",
- "httparse",
- "lazy_static",
- "log",
- "net2",
- "num_cpus",
- "paste",
- "serde",
- "serde_derive",
- "serde_json",
- "smallvec",
- "socket2",
- "templatify",
- "thruster-proc",
- "time 0.1.44",
- "tokio",
- "tokio-stream",
- "tokio-util 0.6.10",
-]
-
-[[package]]
-name = "thruster-proc"
-version = "1.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2cfac33b0a1b0be1aae8e3ca87005671eb2e33617661c20052c98709410d364f"
-dependencies = [
- "lazy_static",
- "proc-macro2 0.4.30",
- "quote 0.6.13",
- "syn 0.15.44",
- "uuid 0.7.4",
-]
-
-[[package]]
-name = "tide"
-version = "0.16.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c459573f0dd2cc734b539047f57489ea875af8ee950860ded20cf93a79a1dee0"
-dependencies = [
- "async-h1",
- "async-session 2.0.1",
- "async-sse",
- "async-std",
- "async-trait",
- "femme",
- "futures-util",
- "http-client",
- "http-types",
- "kv-log-macro",
- "log",
- "pin-project-lite 0.2.9",
- "route-recognizer",
- "serde",
- "serde_json",
-]
-
-[[package]]
-name = "time"
-version = "0.1.44"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
-dependencies = [
- "libc",
- "wasi 0.10.0+wasi-snapshot-preview1",
- "winapi",
-]
-
-[[package]]
-name = "time"
-version = "0.2.27"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242"
-dependencies = [
- "const_fn",
- "libc",
- "standback",
- "stdweb",
- "time-macros 0.1.1",
- "version_check",
- "winapi",
-]
-
[[package]]
name = "time"
version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217"
dependencies = [
- "itoa 1.0.2",
+ "itoa",
"libc",
"num_threads",
- "serde",
- "time-macros 0.2.4",
-]
-
-[[package]]
-name = "time-macros"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1"
-dependencies = [
- "proc-macro-hack",
- "time-macros-impl",
+ "time-macros",
]
[[package]]
@@ -6880,19 +5344,6 @@ version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792"
-[[package]]
-name = "time-macros-impl"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f"
-dependencies = [
- "proc-macro-hack",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "standback",
- "syn 1.0.104",
-]
-
[[package]]
name = "tinyvec"
version = "1.6.0"
@@ -6910,22 +5361,22 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]]
name = "tokio"
-version = "1.22.0"
+version = "1.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d76ce4a75fb488c605c54bf610f221cea8b0dafb53333c1a67e8ee199dcd2ae3"
+checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64"
dependencies = [
- "autocfg 1.1.0",
- "bytes 1.3.0",
+ "autocfg",
+ "bytes",
"libc",
"memchr",
"mio",
"num_cpus",
"parking_lot 0.12.1",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"signal-hook-registry",
"socket2",
"tokio-macros",
- "winapi",
+ "windows-sys 0.45.0",
]
[[package]]
@@ -6934,7 +5385,7 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf"
dependencies = [
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"tokio",
]
@@ -6944,9 +5395,9 @@ version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -6972,12 +5423,12 @@ dependencies = [
[[package]]
name = "tokio-stream"
-version = "0.1.9"
+version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df54d54117d6fdc4e4fea40fe1e4e566b3505700e148a6827e59b34b0d2600d9"
+checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce"
dependencies = [
"futures-core",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"tokio",
]
@@ -6988,7 +5439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53474327ae5e166530d17f2d956afcb4f8a004de581b3cae10f12006bc8163e3"
dependencies = [
"async-stream",
- "bytes 1.3.0",
+ "bytes",
"futures-core",
"tokio",
"tokio-stream",
@@ -7008,33 +5459,17 @@ dependencies = [
"tungstenite",
]
-[[package]]
-name = "tokio-util"
-version = "0.6.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507"
-dependencies = [
- "bytes 1.3.0",
- "futures-core",
- "futures-io",
- "futures-sink",
- "log",
- "pin-project-lite 0.2.9",
- "slab",
- "tokio",
-]
-
[[package]]
name = "tokio-util"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45"
dependencies = [
- "bytes 1.3.0",
+ "bytes",
"futures-core",
"futures-io",
"futures-sink",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"tokio",
"tracing",
]
@@ -7105,12 +5540,12 @@ dependencies = [
"async-stream",
"async-trait",
"axum",
- "base64 0.13.1",
- "bytes 1.3.0",
+ "base64",
+ "bytes",
"futures-core",
"futures-util",
"h2",
- "http 0.2.8",
+ "http",
"http-body",
"hyper",
"hyper-timeout",
@@ -7120,7 +5555,7 @@ dependencies = [
"prost-derive",
"tokio",
"tokio-stream",
- "tokio-util 0.7.3",
+ "tokio-util",
"tower",
"tower-layer",
"tower-service",
@@ -7135,10 +5570,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31fa2c5e870bdce133847d15e075333e6e1ca3fff913001fede6754f3060e367"
dependencies = [
"prettyplease",
- "proc-macro2 1.0.47",
+ "proc-macro2",
"prost-build",
- "quote 1.0.21",
- "syn 1.0.104",
+ "quote",
+ "syn",
]
[[package]]
@@ -7151,11 +5586,11 @@ dependencies = [
"futures-util",
"indexmap",
"pin-project",
- "pin-project-lite 0.2.9",
- "rand 0.8.5",
+ "pin-project-lite",
+ "rand",
"slab",
"tokio",
- "tokio-util 0.7.3",
+ "tokio-util",
"tower-layer",
"tower-service",
"tracing",
@@ -7168,13 +5603,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aba3f3efabf7fb41fae8534fc20a817013dd1c12cb45441efb6c82e6556b4cd8"
dependencies = [
"bitflags",
- "bytes 1.3.0",
+ "bytes",
"futures-core",
"futures-util",
- "http 0.2.8",
+ "http",
"http-body",
"http-range-header",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"tower-layer",
"tower-service",
]
@@ -7185,14 +5620,15 @@ version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858"
dependencies = [
+ "base64",
"bitflags",
- "bytes 1.3.0",
+ "bytes",
"futures-core",
"futures-util",
- "http 0.2.8",
+ "http",
"http-body",
"http-range-header",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"tower",
"tower-layer",
"tower-service",
@@ -7219,7 +5655,7 @@ checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8"
dependencies = [
"cfg-if 1.0.0",
"log",
- "pin-project-lite 0.2.9",
+ "pin-project-lite",
"tracing-attributes",
"tracing-core",
]
@@ -7230,9 +5666,9 @@ version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -7326,7 +5762,7 @@ dependencies = [
"ipnet",
"lazy_static",
"log",
- "rand 0.8.5",
+ "rand",
"smallvec",
"thiserror",
"tinyvec",
@@ -7390,29 +5826,18 @@ version = "0.17.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0"
dependencies = [
- "base64 0.13.1",
+ "base64",
"byteorder",
- "bytes 1.3.0",
- "http 0.2.8",
+ "bytes",
+ "http",
"httparse",
"log",
"native-tls",
- "rand 0.8.5",
- "rustls",
+ "rand",
"sha-1",
"thiserror",
"url",
"utf-8",
- "webpki",
-]
-
-[[package]]
-name = "twoway"
-version = "0.1.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1"
-dependencies = [
- "memchr",
]
[[package]]
@@ -7421,42 +5846,17 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89851716b67b937e393b3daa8423e67ddfc4bbbf1654bcf05488e95e0828db0c"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
+ "proc-macro2",
+ "quote",
+ "syn",
]
-[[package]]
-name = "typemap_rev"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed5b74f0a24b5454580a79abb6994393b09adf0ab8070f15827cb666255de155"
-
[[package]]
name = "typenum"
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
-[[package]]
-name = "ubyte"
-version = "0.10.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a58e29f263341a29bb79e14ad7fda5f63b1c7e48929bad4c685d7876b1d04e94"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "uncased"
-version = "0.9.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09b01702b0fd0b3fadcf98e098780badda8742d4f4a7676615cad90e8ac73622"
-dependencies = [
- "serde",
- "version_check",
-]
-
[[package]]
name = "unicase"
version = "2.6.0"
@@ -7499,12 +5899,6 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
-[[package]]
-name = "unicode-xid"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
-
[[package]]
name = "unicode-xid"
version = "0.2.3"
@@ -7517,16 +5911,6 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"
-[[package]]
-name = "universal-hash"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05"
-dependencies = [
- "generic-array",
- "subtle",
-]
-
[[package]]
name = "untrusted"
version = "0.7.1"
@@ -7539,7 +5923,7 @@ version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b97acb4c28a254fd7a4aeec976c46a7fa404eac4d7c134b30c75144846d7cb8f"
dependencies = [
- "base64 0.13.1",
+ "base64",
"chunked_transfer",
"log",
"native-tls",
@@ -7562,14 +5946,13 @@ dependencies = [
"form_urlencoded",
"idna 0.3.0",
"percent-encoding",
- "serde",
]
[[package]]
name = "urlencoding"
-version = "2.1.0"
+version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68b90931029ab9b034b300b797048cf23723400aa757e8a2bfb9d748102f9821"
+checksum = "e8db7427f936968176eaa7cdf81b7f98b980b18495ec28f1b5791ac3bfe3eea9"
[[package]]
name = "utf-8"
@@ -7583,22 +5966,13 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "936e4b492acfd135421d8dca4b1aa80a7bfc26e702ef3af710e0752684df5372"
-[[package]]
-name = "uuid"
-version = "0.7.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a"
-dependencies = [
- "rand 0.6.5",
-]
-
[[package]]
name = "uuid"
version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c"
dependencies = [
- "getrandom 0.2.7",
+ "getrandom",
"serde",
]
@@ -7609,204 +5983,441 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
[[package]]
-name = "value-bag"
-version = "1.0.0-alpha.9"
+name = "vcpkg"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "vte"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6cbce692ab4ca2f1f3047fcf732430249c0e971bfdd2b234cf2c47ad93af5983"
+dependencies = [
+ "arrayvec 0.5.2",
+ "utf8parse",
+ "vte_generate_state_changes",
+]
+
+[[package]]
+name = "vte_generate_state_changes"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d257817081c7dffcdbab24b9e62d2def62e2ff7d00b1c20062551e6cccc145ff"
+dependencies = [
+ "proc-macro2",
+ "quote",
+]
+
+[[package]]
+name = "wait-timeout"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "walkdir"
+version = "2.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
+dependencies = [
+ "same-file",
+ "winapi",
+ "winapi-util",
+]
+
+[[package]]
+name = "want"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
+dependencies = [
+ "log",
+ "try-lock",
+]
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasi-cap-std-sync"
+version = "4.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79eba5cf83a4adb2ccba4c029858229a4992dd88cc35dbfa5a555ec7fc2a8416"
+dependencies = [
+ "anyhow",
+ "async-trait",
+ "cap-fs-ext",
+ "cap-rand",
+ "cap-std",
+ "cap-time-ext",
+ "fs-set-times",
+ "io-extras",
+ "io-lifetimes",
+ "is-terminal",
+ "once_cell",
+ "rustix",
+ "system-interface",
+ "tracing",
+ "wasi-common",
+ "windows-sys 0.42.0",
+]
+
+[[package]]
+name = "wasi-common"
+version = "4.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "678ff55fb89ae721dae166003b843f53ee3e7bdb96aa96715fec8d44d012b105"
+dependencies = [
+ "anyhow",
+ "bitflags",
+ "cap-rand",
+ "cap-std",
+ "io-extras",
+ "rustix",
+ "thiserror",
+ "tracing",
+ "wasmtime",
+ "wiggle",
+ "windows-sys 0.42.0",
+]
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.81"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c53b543413a17a202f4be280a7e5c62a1c69345f5de525ee64f8cfdbc954994"
+dependencies = [
+ "cfg-if 1.0.0",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.81"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5491a68ab4500fa6b4d726bd67408630c3dbe9c4fe7bda16d5c82a1fd8c7340a"
+dependencies = [
+ "bumpalo",
+ "lazy_static",
+ "log",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "de9a9cec1733468a8c657e57fa2413d2ae2c0129b95e87c5b72b8ace4d13f31f"
+dependencies = [
+ "cfg-if 1.0.0",
+ "js-sys",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.81"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55"
+checksum = "c441e177922bc58f1e12c022624b6216378e5febc2f0533e41ba443d505b80aa"
dependencies = [
- "ctor",
- "erased-serde",
- "serde",
- "serde_fmt",
- "sval",
- "version_check",
+ "quote",
+ "wasm-bindgen-macro-support",
]
[[package]]
-name = "vcpkg"
-version = "0.2.15"
+name = "wasm-bindgen-macro-support"
+version = "0.2.81"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
[[package]]
-name = "version_check"
-version = "0.9.4"
+name = "wasm-bindgen-shared"
+version = "0.2.81"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+checksum = "6a89911bd99e5f3659ec4acf9c4d93b0a90fe4a2a11f15328472058edc5261be"
[[package]]
-name = "vte"
-version = "0.10.1"
+name = "wasm-encoder"
+version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6cbce692ab4ca2f1f3047fcf732430249c0e971bfdd2b234cf2c47ad93af5983"
+checksum = "05632e0a66a6ed8cca593c24223aabd6262f256c3693ad9822c315285f010614"
dependencies = [
- "arrayvec",
- "utf8parse",
- "vte_generate_state_changes",
+ "leb128",
]
[[package]]
-name = "vte_generate_state_changes"
-version = "0.1.1"
+name = "wasmparser"
+version = "0.95.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d257817081c7dffcdbab24b9e62d2def62e2ff7d00b1c20062551e6cccc145ff"
+checksum = "f2ea896273ea99b15132414be1da01ab0d8836415083298ecaffbe308eaac87a"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
+ "indexmap",
+ "url",
]
[[package]]
-name = "wait-timeout"
-version = "0.2.0"
+name = "wasmtime"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
+checksum = "4abddf11816dd8f5e7310f6ebe5a2503b43f20ab2bf050b7d63f5b1bb96a81d9"
dependencies = [
+ "anyhow",
+ "async-trait",
+ "bincode",
+ "cfg-if 1.0.0",
+ "indexmap",
"libc",
+ "log",
+ "object",
+ "once_cell",
+ "paste",
+ "psm",
+ "rayon",
+ "serde",
+ "target-lexicon",
+ "wasmparser",
+ "wasmtime-cache",
+ "wasmtime-cranelift",
+ "wasmtime-environ",
+ "wasmtime-fiber",
+ "wasmtime-jit",
+ "wasmtime-runtime",
+ "wat",
+ "windows-sys 0.42.0",
]
[[package]]
-name = "waker-fn"
-version = "1.1.0"
+name = "wasmtime-asm-macros"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
+checksum = "c1f5206486f0467ba86e84d35996c4048b077cec2c9e5b322e7b853bdbe79334"
+dependencies = [
+ "cfg-if 1.0.0",
+]
[[package]]
-name = "walkdir"
-version = "2.3.2"
+name = "wasmtime-cache"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
+checksum = "d1e77abcf538af42517e188c109e4b50ecf6c0ee4d77ede76a438e0306b934dc"
dependencies = [
- "same-file",
- "winapi",
- "winapi-util",
+ "anyhow",
+ "base64",
+ "bincode",
+ "directories-next",
+ "file-per-thread-logger",
+ "log",
+ "rustix",
+ "serde",
+ "sha2 0.10.2",
+ "toml",
+ "windows-sys 0.42.0",
+ "zstd",
]
[[package]]
-name = "want"
-version = "0.3.0"
+name = "wasmtime-cranelift"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
+checksum = "9e5bcb1d5ef211726b11e1286fe96cb40c69044c3632e1d6c67805d88a2e1a34"
dependencies = [
+ "anyhow",
+ "cranelift-codegen",
+ "cranelift-entity",
+ "cranelift-frontend",
+ "cranelift-native",
+ "cranelift-wasm",
+ "gimli",
"log",
- "try-lock",
+ "object",
+ "target-lexicon",
+ "thiserror",
+ "wasmparser",
+ "wasmtime-environ",
]
[[package]]
-name = "warp"
-version = "0.3.3"
+name = "wasmtime-environ"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed7b8be92646fc3d18b06147664ebc5f48d222686cb11a8755e561a735aacc6d"
+checksum = "dcab3fac5a2ff68ce9857166a7d7c0e5251b554839b9dda7ed3b5528e191936e"
dependencies = [
- "bytes 1.3.0",
- "futures-channel",
- "futures-util",
- "headers",
- "http 0.2.8",
- "hyper",
+ "anyhow",
+ "cranelift-entity",
+ "gimli",
+ "indexmap",
"log",
- "mime",
- "mime_guess",
- "multipart",
- "percent-encoding",
- "pin-project",
- "rustls-pemfile 0.2.1",
- "scoped-tls",
+ "object",
"serde",
- "serde_json",
- "serde_urlencoded",
- "tokio",
- "tokio-stream",
- "tokio-tungstenite",
- "tokio-util 0.7.3",
- "tower-service",
- "tracing",
+ "target-lexicon",
+ "thiserror",
+ "wasmparser",
+ "wasmtime-types",
]
[[package]]
-name = "wasi"
-version = "0.9.0+wasi-snapshot-preview1"
+name = "wasmtime-fiber"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
+checksum = "2fb38af221b780f2c03764d763fe7f7bc414ea9db744d66dac98f9b694892561"
+dependencies = [
+ "cc",
+ "cfg-if 1.0.0",
+ "rustix",
+ "wasmtime-asm-macros",
+ "windows-sys 0.42.0",
+]
[[package]]
-name = "wasi"
-version = "0.10.0+wasi-snapshot-preview1"
+name = "wasmtime-jit"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
+checksum = "a7d866e2a84ee164739b7ed7bd7cc9e1f918639d2ec5e2817a31e24c148cab20"
+dependencies = [
+ "addr2line",
+ "anyhow",
+ "bincode",
+ "cfg-if 1.0.0",
+ "cpp_demangle",
+ "gimli",
+ "ittapi",
+ "log",
+ "object",
+ "rustc-demangle",
+ "serde",
+ "target-lexicon",
+ "wasmtime-environ",
+ "wasmtime-jit-debug",
+ "wasmtime-jit-icache-coherence",
+ "wasmtime-runtime",
+ "windows-sys 0.42.0",
+]
[[package]]
-name = "wasi"
-version = "0.11.0+wasi-snapshot-preview1"
+name = "wasmtime-jit-debug"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+checksum = "0104c2b1ce443f2a2806216fcdf6dce09303203ec5797a698d313063b31e5bc8"
+dependencies = [
+ "object",
+ "once_cell",
+ "rustix",
+]
[[package]]
-name = "wasm-bindgen"
-version = "0.2.81"
+name = "wasmtime-jit-icache-coherence"
+version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c53b543413a17a202f4be280a7e5c62a1c69345f5de525ee64f8cfdbc954994"
+checksum = "22d9c2e92b0fc124d2cad6cb497a4c840580a7dd2414a37109e8c7cfe699c0ea"
dependencies = [
"cfg-if 1.0.0",
- "serde",
- "serde_json",
- "wasm-bindgen-macro",
+ "libc",
+ "windows-sys 0.42.0",
]
[[package]]
-name = "wasm-bindgen-backend"
-version = "0.2.81"
+name = "wasmtime-runtime"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5491a68ab4500fa6b4d726bd67408630c3dbe9c4fe7bda16d5c82a1fd8c7340a"
+checksum = "0a1f0f99297a94cb20c511d1d4e864d9b54794644016d2530dc797cacfa7224a"
dependencies = [
- "bumpalo",
- "lazy_static",
+ "anyhow",
+ "cc",
+ "cfg-if 1.0.0",
+ "indexmap",
+ "libc",
"log",
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
- "wasm-bindgen-shared",
+ "mach",
+ "memfd",
+ "memoffset 0.6.5",
+ "paste",
+ "rand",
+ "rustix",
+ "wasmtime-asm-macros",
+ "wasmtime-environ",
+ "wasmtime-fiber",
+ "wasmtime-jit-debug",
+ "windows-sys 0.42.0",
]
[[package]]
-name = "wasm-bindgen-futures"
-version = "0.4.31"
+name = "wasmtime-types"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de9a9cec1733468a8c657e57fa2413d2ae2c0129b95e87c5b72b8ace4d13f31f"
+checksum = "62f3d8ee409447cae51651fd812437a0047ed8d7f44e94171ee05ce7cb955c96"
dependencies = [
- "cfg-if 1.0.0",
- "js-sys",
- "wasm-bindgen",
- "web-sys",
+ "cranelift-entity",
+ "serde",
+ "thiserror",
+ "wasmparser",
]
[[package]]
-name = "wasm-bindgen-macro"
-version = "0.2.81"
+name = "wasmtime-wasi"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c441e177922bc58f1e12c022624b6216378e5febc2f0533e41ba443d505b80aa"
+checksum = "9f32b06e3282ccbeab6fb96c64fa12a359f1253022dfd5cf99385b2344e70830"
dependencies = [
- "quote 1.0.21",
- "wasm-bindgen-macro-support",
+ "anyhow",
+ "wasi-cap-std-sync",
+ "wasi-common",
+ "wasmtime",
+ "wiggle",
]
[[package]]
-name = "wasm-bindgen-macro-support"
-version = "0.2.81"
+name = "wast"
+version = "35.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048"
+checksum = "2ef140f1b49946586078353a453a1d28ba90adfc54dde75710bc1931de204d68"
dependencies = [
- "proc-macro2 1.0.47",
- "quote 1.0.21",
- "syn 1.0.104",
- "wasm-bindgen-backend",
- "wasm-bindgen-shared",
+ "leb128",
]
[[package]]
-name = "wasm-bindgen-shared"
-version = "0.2.81"
+name = "wast"
+version = "50.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a89911bd99e5f3659ec4acf9c4d93b0a90fe4a2a11f15328472058edc5261be"
+checksum = "a2cbb59d4ac799842791fe7e806fa5dbbf6b5554d538e51cc8e176db6ff0ae34"
+dependencies = [
+ "leb128",
+ "memchr",
+ "unicode-width",
+ "wasm-encoder",
+]
+
+[[package]]
+name = "wat"
+version = "1.0.52"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "584aaf7a1ecf4d383bbe1a25eeab0cbb8ff96acc6796707ff65cde48f4632f15"
+dependencies = [
+ "wast 50.0.0",
+]
[[package]]
name = "web-sys"
@@ -7853,24 +6464,15 @@ dependencies = [
"webpki",
]
-[[package]]
-name = "wepoll-ffi"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb"
-dependencies = [
- "cc",
-]
-
[[package]]
name = "which"
-version = "4.2.5"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae"
+checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269"
dependencies = [
"either",
- "lazy_static",
"libc",
+ "once_cell",
]
[[package]]
@@ -7889,6 +6491,48 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983"
+[[package]]
+name = "wiggle"
+version = "4.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a2433252352677648dc4ac0c99e7e254e1c58be8019cda3323ab3a3ce29da5b"
+dependencies = [
+ "anyhow",
+ "async-trait",
+ "bitflags",
+ "thiserror",
+ "tracing",
+ "wasmtime",
+ "wiggle-macro",
+]
+
+[[package]]
+name = "wiggle-generate"
+version = "4.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c15bf89e66bd1a9463ee529d37b999947befafd792f345d4a82e0d2b28c0845f"
+dependencies = [
+ "anyhow",
+ "heck",
+ "proc-macro2",
+ "quote",
+ "shellexpand",
+ "syn",
+ "witx",
+]
+
+[[package]]
+name = "wiggle-macro"
+version = "4.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "919fb8f106375c7f6daf7b388a1fea3e2092dedb273b17b2d917522917c07a3c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wiggle-generate",
+]
+
[[package]]
name = "winapi"
version = "0.3.9"
@@ -7940,19 +6584,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
dependencies = [
"windows_aarch64_gnullvm",
- "windows_aarch64_msvc 0.42.0",
- "windows_i686_gnu 0.42.0",
- "windows_i686_msvc 0.42.0",
- "windows_x86_64_gnu 0.42.0",
+ "windows_aarch64_msvc 0.42.1",
+ "windows_i686_gnu 0.42.1",
+ "windows_i686_msvc 0.42.1",
+ "windows_x86_64_gnu 0.42.1",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc 0.42.1",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.45.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.42.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc 0.42.1",
+ "windows_i686_gnu 0.42.1",
+ "windows_i686_msvc 0.42.1",
+ "windows_x86_64_gnu 0.42.1",
"windows_x86_64_gnullvm",
- "windows_x86_64_msvc 0.42.0",
+ "windows_x86_64_msvc 0.42.1",
]
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.42.0"
+version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e"
+checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608"
[[package]]
name = "windows_aarch64_msvc"
@@ -7962,9 +6630,9 @@ checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.42.0"
+version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4"
+checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
[[package]]
name = "windows_i686_gnu"
@@ -7974,9 +6642,9 @@ checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
[[package]]
name = "windows_i686_gnu"
-version = "0.42.0"
+version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7"
+checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"
[[package]]
name = "windows_i686_msvc"
@@ -7986,9 +6654,9 @@ checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
[[package]]
name = "windows_i686_msvc"
-version = "0.42.0"
+version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246"
+checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
[[package]]
name = "windows_x86_64_gnu"
@@ -7998,15 +6666,15 @@ checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.42.0"
+version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed"
+checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.42.0"
+version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028"
+checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463"
[[package]]
name = "windows_x86_64_msvc"
@@ -8016,9 +6684,9 @@ checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.42.0"
+version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5"
+checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
[[package]]
name = "winreg"
@@ -8038,6 +6706,29 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "winx"
+version = "0.34.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9baf690e238840de84bbfad6ad72d6628c41d34c1a5e276dab7fb2c9167ca1ac"
+dependencies = [
+ "bitflags",
+ "io-lifetimes",
+ "windows-sys 0.42.0",
+]
+
+[[package]]
+name = "witx"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e366f27a5cabcddb2706a78296a40b8fcc451e1a6aba2fc1d94b4a01bdaaef4b"
+dependencies = [
+ "anyhow",
+ "log",
+ "thiserror",
+ "wast 35.0.2",
+]
+
[[package]]
name = "xattr"
version = "0.2.3"
@@ -8065,7 +6756,7 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "346d34a236c9d3e5f3b9b74563f238f955bbd05fa0b8b4efa53c130c43982f4c"
dependencies = [
- "time 0.3.11",
+ "time",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index 5bd66069a..b6d8b90bb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,6 +9,7 @@ members = [
"gateway",
"proto",
"provisioner",
+ "runtime",
"service"
]
@@ -19,26 +20,27 @@ exclude = [
"resources/persist",
"resources/secrets",
"resources/shared-db",
- "resources/static-folder"
+ "resources/static-folder",
+ "services"
]
[workspace.package]
-version = "0.11.0"
+version = "0.12.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/shuttle-hq/shuttle"
# https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspacedependencies-table
[workspace.dependencies]
-shuttle-codegen = { path = "codegen", version = "0.11.0" }
-shuttle-common = { path = "common", version = "0.11.2" }
-shuttle-proto = { path = "proto", version = "0.11.0" }
-shuttle-service = { path = "service", version = "0.11.0" }
+shuttle-codegen = { path = "codegen", version = "0.12.0" }
+shuttle-common = { path = "common", version = "0.12.0" }
+shuttle-proto = { path = "proto", version = "0.12.0" }
+shuttle-service = { path = "service", version = "0.12.0" }
anyhow = "1.0.66"
async-trait = "0.1.58"
-axum = "0.6.0"
-chrono = { version = "0.4.23", default-features = false, features = ["clock"] }
+axum = { version = "0.6.0", default-features = false }
+chrono = { version = "0.4.23", default-features = false }
clap = { version = "4.0.27", features = [ "derive" ] }
headers = "0.3.8"
http = "0.2.8"
@@ -49,16 +51,18 @@ opentelemetry = { version = "0.18.0", features = ["rt-tokio"] }
opentelemetry-http = "0.7.0"
pin-project = "1.0.12"
portpicker = "0.1.1"
+prost-types = "0.11.0"
rand = "0.8.5"
ring = "0.16.20"
-serde = "1.0.148"
+serde = { version = "1.0.148", default-features = false }
serde_json = "1.0.89"
strum = { version = "0.24.1", features = ["derive"] }
thiserror = "1.0.37"
+tonic = "0.8.3"
tower = "0.4.13"
tower-http = { version = "0.3.4", features = ["trace"] }
-tracing = "0.1.37"
+tracing = { version = "0.1.37", default-features = false }
tracing-opentelemetry = "0.18.0"
-tracing-subscriber = "0.3.16"
+tracing-subscriber = { version = "0.3.16", default-features = false, features = ["registry", "std"] }
ttl_cache = "0.5.1"
uuid = "1.2.2"
diff --git a/Containerfile b/Containerfile
index 0765cba36..6dce75316 100644
--- a/Containerfile
+++ b/Containerfile
@@ -14,7 +14,7 @@ WORKDIR /build
FROM shuttle-build as cache
WORKDIR /src
COPY . .
-RUN find ${SRC_CRATES} \( -name "*.proto" -or -name "*.rs" -or -name "*.toml" -or -name "README.md" -or -name "*.sql" \) -type f -exec install -D \{\} /build/\{\} \;
+RUN find ${SRC_CRATES} \( -name "*.proto" -or -name "*.rs" -or -name "*.toml" -or -name "Cargo.lock" -or -name "README.md" -or -name "*.sql" \) -type f -exec install -D \{\} /build/\{\} \;
FROM shuttle-build AS planner
COPY --from=cache /build .
@@ -26,12 +26,18 @@ ARG CARGO_PROFILE
RUN cargo chef cook $(if [ "$CARGO_PROFILE" = "release" ]; then echo --${CARGO_PROFILE}; fi) --recipe-path recipe.json
COPY --from=cache /build .
ARG folder
+# if CARGO_PROFILE is release, pass --release, else use default debug profile
RUN cargo build --bin shuttle-${folder} $(if [ "$CARGO_PROFILE" = "release" ]; then echo --${CARGO_PROFILE}; fi)
ARG RUSTUP_TOOLCHAIN
FROM rust:${RUSTUP_TOOLCHAIN}-buster as shuttle-common
RUN apt-get update &&\
apt-get install -y curl
+# download protoc binary and unzip it in usr/bin
+RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-linux-x86_64.zip &&\
+ unzip -o protoc-21.9-linux-x86_64.zip -d /usr bin/protoc &&\
+ unzip -o protoc-21.9-linux-x86_64.zip -d /usr/ 'include/*' &&\
+ rm -f protoc-21.9-linux-x86_64.zip
RUN rustup component add rust-src
COPY --from=cache /build/ /usr/src/shuttle/
diff --git a/Makefile b/Makefile
index 2bed9be28..c4752a48c 100644
--- a/Makefile
+++ b/Makefile
@@ -124,8 +124,8 @@ test:
cd e2e; POSTGRES_PASSWORD=$(POSTGRES_PASSWORD) APPS_FQDN=$(APPS_FQDN) cargo test $(CARGO_TEST_FLAGS) -- --nocapture
# Start the containers locally. This does not start panamax by default,
-# to start panamax locally run this command with the COMPOSE_PROFILES=panamax
-# environment variable.
+# to start panamax locally run this command with an override for the profiles:
+# `make COMPOSE_PROFILES=panamax up`
up: docker-compose.rendered.yml
CONTAINER_REGISTRY=$(CONTAINER_REGISTRY) $(DOCKER_COMPOSE) -f $< -p $(STACK) up -d $(DOCKER_COMPOSE_FLAGS)
diff --git a/README.md b/README.md
index 03b30c12b..537e6bd22 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
-
+
@@ -72,7 +72,7 @@ And that's... it.
```bash
$ cargo shuttle deploy
- Finished dev [unoptimized + debuginfo] target(s) in 1m 01s
+ Finished release [optimized + debuginfo] target(s) in 1m 01s
Project: hello-world
Deployment Id: 3d08ac34-ad63-41c1-836b-99afdc90af9f
diff --git a/admin/Cargo.toml b/admin/Cargo.toml
index 993558126..76e1996d0 100644
--- a/admin/Cargo.toml
+++ b/admin/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "shuttle-admin"
-version = "0.11.0"
+version = "0.12.0"
edition = "2021"
[dependencies]
@@ -12,8 +12,8 @@ serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
tokio = { version = "1.22.0", features = ["macros", "rt-multi-thread"] }
toml = "0.5.9"
-tracing = { workspace = true }
-tracing-subscriber = { workspace = true, features = ["env-filter"] }
+tracing = { workspace = true, features = ["default"] }
+tracing-subscriber = { workspace = true, features = ["default", "env-filter"] }
[dependencies.shuttle-common]
workspace = true
diff --git a/auth/src/api/handlers.rs b/auth/src/api/handlers.rs
index 2d08221ce..b45061bf6 100644
--- a/auth/src/api/handlers.rs
+++ b/auth/src/api/handlers.rs
@@ -9,7 +9,7 @@ use axum::{
use axum_sessions::extractors::{ReadableSession, WritableSession};
use http::StatusCode;
use serde::{Deserialize, Serialize};
-use shuttle_common::{backends::auth::Claim, models::user};
+use shuttle_common::{claims::Claim, models::user};
use tracing::instrument;
use super::{
diff --git a/auth/src/user.rs b/auth/src/user.rs
index 264adfb60..8d9b5a0c9 100644
--- a/auth/src/user.rs
+++ b/auth/src/user.rs
@@ -9,7 +9,7 @@ use axum::{
};
use rand::distributions::{Alphanumeric, DistString};
use serde::{Deserialize, Deserializer, Serialize};
-use shuttle_common::backends::auth::Scope;
+use shuttle_common::claims::Scope;
use sqlx::{query, Row, SqlitePool};
use tracing::{trace, Span};
diff --git a/auth/tests/api/session.rs b/auth/tests/api/session.rs
index aa07e8bdd..b768a0096 100644
--- a/auth/tests/api/session.rs
+++ b/auth/tests/api/session.rs
@@ -2,7 +2,7 @@ use axum_extra::extract::cookie::{self, Cookie};
use http::{Request, StatusCode};
use hyper::Body;
use serde_json::{json, Value};
-use shuttle_common::backends::auth::Claim;
+use shuttle_common::claims::Claim;
use crate::helpers::app;
diff --git a/cargo-shuttle/Cargo.toml b/cargo-shuttle/Cargo.toml
index 64d9d8f26..75224a0cc 100644
--- a/cargo-shuttle/Cargo.toml
+++ b/cargo-shuttle/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "cargo-shuttle"
-version = "0.11.2"
+version = "0.12.0"
edition.workspace = true
license.workspace = true
repository.workspace = true
@@ -22,9 +22,11 @@ crossbeam-channel = "0.5.6"
crossterm = "0.25.0"
dialoguer = { version = "0.10.2", features = ["fuzzy-select"] }
dirs = "4.0.0"
+dunce = "1.0.3"
flate2 = "1.0.25"
futures = "0.3.25"
git2 = "0.14.2"
+home = "0.5.4"
headers = { workspace = true }
indicatif = "0.17.2"
ignore = "0.4.18"
@@ -47,8 +49,9 @@ tokio = { version = "1.22.0", features = ["macros"] }
tokio-tungstenite = { version = "0.17.2", features = ["native-tls"] }
toml = "0.5.9"
toml_edit = "0.15.0"
-tracing = { workspace = true }
-tracing-subscriber = { workspace = true, features = ["env-filter"] }
+tonic = { workspace = true }
+tracing = { workspace = true, features = ["default"] }
+tracing-subscriber = { workspace = true, features = ["default", "env-filter", "fmt"] }
url = "2.3.1"
uuid = { workspace = true, features = ["v4"] }
webbrowser = "0.8.2"
@@ -57,13 +60,16 @@ webbrowser = "0.8.2"
workspace = true
features = ["models"]
+[dependencies.shuttle-proto]
+workspace = true
+
[dependencies.shuttle-secrets]
-version = "0.11.0"
+version = "0.12.0"
path = "../resources/secrets"
[dependencies.shuttle-service]
workspace = true
-features = ["loader"]
+features = ["builder"]
[features]
vendored-openssl = ["openssl/vendored"]
diff --git a/cargo-shuttle/README.md b/cargo-shuttle/README.md
index ae1da5f10..aee7b13b8 100644
--- a/cargo-shuttle/README.md
+++ b/cargo-shuttle/README.md
@@ -105,7 +105,7 @@ cargo shuttle init --rocket my-rocket-app
This should generate the following dependency in `Cargo.toml`:
```toml
-shuttle-service = { version = "0.11.0", features = ["web-rocket"] }
+shuttle-service = { version = "0.12.0", features = ["web-rocket"] }
```
The following boilerplate code should be generated into `src/lib.rs`:
diff --git a/cargo-shuttle/src/args.rs b/cargo-shuttle/src/args.rs
index fb1347198..9810a7a21 100644
--- a/cargo-shuttle/src/args.rs
+++ b/cargo-shuttle/src/args.rs
@@ -1,6 +1,6 @@
use std::{
ffi::OsString,
- fs::{canonicalize, create_dir_all},
+ fs::create_dir_all,
io::{self, ErrorKind},
path::PathBuf,
};
@@ -203,7 +203,7 @@ pub struct InitArgs {
#[command(flatten)]
pub login_args: LoginArgs,
/// Path to initialize a new shuttle project
- #[arg(default_value = ".", value_parser = OsStringValueParser::new().try_map(parse_path) )]
+ #[arg(default_value = ".", value_parser = OsStringValueParser::new().try_map(parse_init_path) )]
pub path: PathBuf,
}
@@ -241,7 +241,7 @@ impl InitArgs {
// Helper function to parse and return the absolute path
fn parse_path(path: OsString) -> Result {
- canonicalize(&path).map_err(|e| format!("could not turn {path:?} into a real path: {e}"))
+ dunce::canonicalize(&path).map_err(|e| format!("could not turn {path:?} into a real path: {e}"))
}
// Helper function to parse, create if not exists, and return the absolute path
diff --git a/cargo-shuttle/src/client.rs b/cargo-shuttle/src/client.rs
index 28ded40ee..048c441b4 100644
--- a/cargo-shuttle/src/client.rs
+++ b/cargo-shuttle/src/client.rs
@@ -200,7 +200,7 @@ impl Client {
async fn ws_get(&self, path: String) -> Result>> {
let ws_scheme = self.api_url.clone().replace("http", "ws");
- let url = format!("{}{}", ws_scheme, path);
+ let url = format!("{ws_scheme}{path}");
let mut request = url.into_client_request()?;
if let Some(ref api_key) = self.api_key {
diff --git a/cargo-shuttle/src/init.rs b/cargo-shuttle/src/init.rs
index b36c1c52c..2926a08ac 100644
--- a/cargo-shuttle/src/init.rs
+++ b/cargo-shuttle/src/init.rs
@@ -6,7 +6,7 @@ use anyhow::Result;
use cargo::ops::NewOptions;
use cargo_edit::{find, get_latest_dependency, registry_url};
use indoc::indoc;
-use toml_edit::{value, Array, Document, Item, Table};
+use toml_edit::{value, Array, Document, Table};
use url::Url;
#[derive(Clone, Copy, Debug, PartialEq, Eq, strum::Display, strum::EnumIter)]
@@ -29,7 +29,7 @@ pub enum Framework {
impl Framework {
/// Returns a framework-specific struct that implements the trait `ShuttleInit`
/// for writing framework-specific dependencies to `Cargo.toml` and generating
- /// boilerplate code in `src/lib.rs`.
+ /// boilerplate code in `src/main.rs`.
pub fn init_config(&self) -> Box {
match self {
Framework::ActixWeb => Box::new(ShuttleInitActixWeb),
@@ -78,29 +78,43 @@ impl ShuttleInit for ShuttleInitActixWeb {
get_dependency_version_fn,
);
- set_inline_table_dependency_features(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-actix-web",
+ dependencies,
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
+ );
+
+ set_key_value_dependency_version(
+ "tokio",
dependencies,
- vec!["web-actix-web".to_string()],
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
);
}
fn get_boilerplate_code_for_framework(&self) -> &'static str {
indoc! {r#"
use actix_web::{get, web::ServiceConfig};
- use shuttle_service::ShuttleActixWeb;
+ use shuttle_actix_web::ShuttleActixWeb;
#[get("/hello")]
async fn hello_world() -> &'static str {
"Hello World!"
}
- #[shuttle_service::main]
+ #[shuttle_runtime::main]
async fn actix_web(
- ) -> ShuttleActixWeb {
- Ok(move |cfg: &mut ServiceConfig| {
+ ) -> ShuttleActixWeb {
+ let config = move |cfg: &mut ServiceConfig| {
cfg.service(hello_world);
- })
+ };
+
+ Ok(config.into())
}"#}
}
}
@@ -124,17 +138,21 @@ impl ShuttleInit for ShuttleInitAxum {
get_dependency_version_fn,
);
- set_inline_table_dependency_features(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-axum",
dependencies,
- vec!["web-axum".to_string()],
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
);
+
set_key_value_dependency_version(
- "sync_wrapper",
+ "tokio",
dependencies,
manifest_path,
url,
- false,
+ true,
get_dependency_version_fn,
);
}
@@ -142,18 +160,16 @@ impl ShuttleInit for ShuttleInitAxum {
fn get_boilerplate_code_for_framework(&self) -> &'static str {
indoc! {r#"
use axum::{routing::get, Router};
- use sync_wrapper::SyncWrapper;
async fn hello_world() -> &'static str {
"Hello, world!"
}
- #[shuttle_service::main]
- async fn axum() -> shuttle_service::ShuttleAxum {
+ #[shuttle_runtime::main]
+ async fn axum() -> shuttle_axum::ShuttleAxum {
let router = Router::new().route("/hello", get(hello_world));
- let sync_wrapper = SyncWrapper::new(router);
- Ok(sync_wrapper)
+ Ok(router.into())
}"#}
}
}
@@ -177,10 +193,22 @@ impl ShuttleInit for ShuttleInitRocket {
get_dependency_version_fn,
);
- set_inline_table_dependency_features(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-rocket",
+ dependencies,
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
+ );
+
+ set_key_value_dependency_version(
+ "tokio",
dependencies,
- vec!["web-rocket".to_string()],
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
);
}
@@ -194,11 +222,11 @@ impl ShuttleInit for ShuttleInitRocket {
"Hello, world!"
}
- #[shuttle_service::main]
- async fn rocket() -> shuttle_service::ShuttleRocket {
+ #[shuttle_runtime::main]
+ async fn rocket() -> shuttle_rocket::ShuttleRocket {
let rocket = rocket::build().mount("/hello", routes![index]);
- Ok(rocket)
+ Ok(rocket.into())
}"#}
}
}
@@ -213,10 +241,22 @@ impl ShuttleInit for ShuttleInitTide {
url: &Url,
get_dependency_version_fn: GetDependencyVersionFn,
) {
- set_inline_table_dependency_features(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-tide",
dependencies,
- vec!["web-tide".to_string()],
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
+ );
+
+ set_key_value_dependency_version(
+ "tokio",
+ dependencies,
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
);
set_key_value_dependency_version(
@@ -231,14 +271,14 @@ impl ShuttleInit for ShuttleInitTide {
fn get_boilerplate_code_for_framework(&self) -> &'static str {
indoc! {r#"
- #[shuttle_service::main]
- async fn tide() -> shuttle_service::ShuttleTide<()> {
+ #[shuttle_runtime::main]
+ async fn tide() -> shuttle_tide::ShuttleTide<()> {
let mut app = tide::new();
app.with(tide::log::LogMiddleware::new());
app.at("/hello").get(|_| async { Ok("Hello, world!") });
- Ok(app)
+ Ok(app.into())
}"#}
}
}
@@ -253,18 +293,30 @@ impl ShuttleInit for ShuttleInitPoem {
url: &Url,
get_dependency_version_fn: GetDependencyVersionFn,
) {
- set_inline_table_dependency_features(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "poem",
dependencies,
- vec!["web-poem".to_string()],
+ manifest_path,
+ url,
+ false,
+ get_dependency_version_fn,
);
set_key_value_dependency_version(
- "poem",
+ "shuttle-poem",
dependencies,
manifest_path,
url,
- false,
+ true,
+ get_dependency_version_fn,
+ );
+
+ set_key_value_dependency_version(
+ "tokio",
+ dependencies,
+ manifest_path,
+ url,
+ true,
get_dependency_version_fn,
);
}
@@ -272,17 +324,18 @@ impl ShuttleInit for ShuttleInitPoem {
fn get_boilerplate_code_for_framework(&self) -> &'static str {
indoc! {r#"
use poem::{get, handler, Route};
+ use shuttle_poem::ShuttlePoem;
#[handler]
fn hello_world() -> &'static str {
"Hello, world!"
}
- #[shuttle_service::main]
- async fn poem() -> shuttle_service::ShuttlePoem {
+ #[shuttle_runtime::main]
+ async fn poem() -> ShuttlePoem {
let app = Route::new().at("/hello", get(hello_world));
- Ok(app)
+ Ok(app.into())
}"#}
}
}
@@ -297,18 +350,30 @@ impl ShuttleInit for ShuttleInitSalvo {
url: &Url,
get_dependency_version_fn: GetDependencyVersionFn,
) {
- set_inline_table_dependency_features(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "salvo",
dependencies,
- vec!["web-salvo".to_string()],
+ manifest_path,
+ url,
+ false,
+ get_dependency_version_fn,
);
set_key_value_dependency_version(
- "salvo",
+ "shuttle-salvo",
dependencies,
manifest_path,
url,
- false,
+ true,
+ get_dependency_version_fn,
+ );
+
+ set_key_value_dependency_version(
+ "tokio",
+ dependencies,
+ manifest_path,
+ url,
+ true,
get_dependency_version_fn,
);
}
@@ -319,14 +384,14 @@ impl ShuttleInit for ShuttleInitSalvo {
#[handler]
async fn hello_world(res: &mut Response) {
- res.render(Text::Plain("Hello, World!"));
+ res.render(Text::Plain("Hello, world!"));
}
- #[shuttle_service::main]
- async fn salvo() -> shuttle_service::ShuttleSalvo {
- let router = Router::new().get(hello_world);
+ #[shuttle_runtime::main]
+ async fn salvo() -> shuttle_salvo::ShuttleSalvo {
+ let router = Router::with_path("hello").get(hello_world);
- Ok(router)
+ Ok(router.into())
}"#}
}
}
@@ -341,12 +406,6 @@ impl ShuttleInit for ShuttleInitSerenity {
url: &Url,
get_dependency_version_fn: GetDependencyVersionFn,
) {
- set_inline_table_dependency_features(
- "shuttle-service",
- dependencies,
- vec!["bot-serenity".to_string()],
- );
-
set_key_value_dependency_version(
"anyhow",
dependencies,
@@ -387,6 +446,24 @@ impl ShuttleInit for ShuttleInitSerenity {
get_dependency_version_fn,
);
+ set_key_value_dependency_version(
+ "shuttle-serenity",
+ dependencies,
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
+ );
+
+ set_key_value_dependency_version(
+ "tokio",
+ dependencies,
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
+ );
+
set_key_value_dependency_version(
"tracing",
dependencies,
@@ -424,10 +501,10 @@ impl ShuttleInit for ShuttleInitSerenity {
}
}
- #[shuttle_service::main]
+ #[shuttle_runtime::main]
async fn serenity(
#[shuttle_secrets::Secrets] secret_store: SecretStore,
- ) -> shuttle_service::ShuttleSerenity {
+ ) -> shuttle_serenity::ShuttleSerenity {
// Get the discord token set in `Secrets.toml`
let token = if let Some(token) = secret_store.get("DISCORD_TOKEN") {
token
@@ -443,7 +520,7 @@ impl ShuttleInit for ShuttleInitSerenity {
.await
.expect("Err creating client");
- Ok(client)
+ Ok(client.into())
}"#}
}
}
@@ -458,12 +535,6 @@ impl ShuttleInit for ShuttleInitPoise {
url: &Url,
get_dependency_version_fn: GetDependencyVersionFn,
) {
- set_inline_table_dependency_features(
- "shuttle-service",
- dependencies,
- vec!["bot-poise".to_string()],
- );
-
set_key_value_dependency_version(
"anyhow",
dependencies,
@@ -482,6 +553,15 @@ impl ShuttleInit for ShuttleInitPoise {
get_dependency_version_fn,
);
+ set_key_value_dependency_version(
+ "shuttle-poise",
+ dependencies,
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
+ );
+
set_key_value_dependency_version(
"shuttle-secrets",
dependencies,
@@ -491,6 +571,15 @@ impl ShuttleInit for ShuttleInitPoise {
get_dependency_version_fn,
);
+ set_key_value_dependency_version(
+ "tokio",
+ dependencies,
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
+ );
+
set_key_value_dependency_version(
"tracing",
dependencies,
@@ -504,47 +593,47 @@ impl ShuttleInit for ShuttleInitPoise {
fn get_boilerplate_code_for_framework(&self) -> &'static str {
indoc! {r#"
use anyhow::Context as _;
- use poise::serenity_prelude as serenity;
- use shuttle_secrets::SecretStore;
- use shuttle_service::ShuttlePoise;
-
- struct Data {} // User data, which is stored and accessible in all command invocations
- type Error = Box;
- type Context<'a> = poise::Context<'a, Data, Error>;
-
- /// Responds with "world!"
- #[poise::command(slash_command)]
- async fn hello(ctx: Context<'_>) -> Result<(), Error> {
- ctx.say("world!").await?;
- Ok(())
- }
-
- #[shuttle_service::main]
- async fn poise(#[shuttle_secrets::Secrets] secret_store: SecretStore) -> ShuttlePoise {
- // Get the discord token set in `Secrets.toml`
- let discord_token = secret_store
- .get("DISCORD_TOKEN")
- .context("'DISCORD_TOKEN' was not found")?;
-
- let framework = poise::Framework::builder()
- .options(poise::FrameworkOptions {
- commands: vec![hello()],
- ..Default::default()
- })
- .token(discord_token)
- .intents(serenity::GatewayIntents::non_privileged())
- .setup(|ctx, _ready, framework| {
- Box::pin(async move {
- poise::builtins::register_globally(ctx, &framework.options().commands).await?;
- Ok(Data {})
- })
- })
- .build()
- .await
- .map_err(shuttle_service::error::CustomError::new)?;
-
- Ok(framework)
- }"#}
+ use poise::serenity_prelude as serenity;
+ use shuttle_secrets::SecretStore;
+ use shuttle_poise::ShuttlePoise;
+
+ struct Data {} // User data, which is stored and accessible in all command invocations
+ type Error = Box;
+ type Context<'a> = poise::Context<'a, Data, Error>;
+
+ /// Responds with "world!"
+ #[poise::command(slash_command)]
+ async fn hello(ctx: Context<'_>) -> Result<(), Error> {
+ ctx.say("world!").await?;
+ Ok(())
+ }
+
+ #[shuttle_runtime::main]
+ async fn poise(#[shuttle_secrets::Secrets] secret_store: SecretStore) -> ShuttlePoise {
+ // Get the discord token set in `Secrets.toml`
+ let discord_token = secret_store
+ .get("DISCORD_TOKEN")
+ .context("'DISCORD_TOKEN' was not found")?;
+
+ let framework = poise::Framework::builder()
+ .options(poise::FrameworkOptions {
+ commands: vec![hello()],
+ ..Default::default()
+ })
+ .token(discord_token)
+ .intents(serenity::GatewayIntents::non_privileged())
+ .setup(|ctx, _ready, framework| {
+ Box::pin(async move {
+ poise::builtins::register_globally(ctx, &framework.options().commands).await?;
+ Ok(Data {})
+ })
+ })
+ .build()
+ .await
+ .map_err(shuttle_runtime::CustomError::new)?;
+
+ Ok(framework.into())
+ }"#}
}
}
@@ -558,25 +647,37 @@ impl ShuttleInit for ShuttleInitTower {
url: &Url,
get_dependency_version_fn: GetDependencyVersionFn,
) {
- set_inline_table_dependency_features(
- "shuttle-service",
+ set_inline_table_dependency_version(
+ "hyper",
dependencies,
- vec!["web-tower".to_string()],
+ manifest_path,
+ url,
+ false,
+ get_dependency_version_fn,
);
- set_inline_table_dependency_version(
- "tower",
+ set_inline_table_dependency_features("hyper", dependencies, vec!["full".to_string()]);
+
+ set_key_value_dependency_version(
+ "shuttle-tower",
dependencies,
manifest_path,
url,
- false,
+ true,
get_dependency_version_fn,
);
- set_inline_table_dependency_features("tower", dependencies, vec!["full".to_string()]);
+ set_key_value_dependency_version(
+ "tokio",
+ dependencies,
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
+ );
set_inline_table_dependency_version(
- "hyper",
+ "tower",
dependencies,
manifest_path,
url,
@@ -584,7 +685,7 @@ impl ShuttleInit for ShuttleInitTower {
get_dependency_version_fn,
);
- set_inline_table_dependency_features("hyper", dependencies, vec!["full".to_string()]);
+ set_inline_table_dependency_features("tower", dependencies, vec!["full".to_string()]);
}
fn get_boilerplate_code_for_framework(&self) -> &'static str {
@@ -619,9 +720,11 @@ impl ShuttleInit for ShuttleInitTower {
}
}
- #[shuttle_service::main]
- async fn tower() -> Result {
- Ok(HelloWorld)
+ #[shuttle_runtime::main]
+ async fn tower() -> shuttle_tower::ShuttleTower {
+ let service = HelloWorld;
+
+ Ok(service.into())
}"#}
}
}
@@ -636,10 +739,22 @@ impl ShuttleInit for ShuttleInitWarp {
url: &Url,
get_dependency_version_fn: GetDependencyVersionFn,
) {
- set_inline_table_dependency_features(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-warp",
dependencies,
- vec!["web-warp".to_string()],
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
+ );
+
+ set_key_value_dependency_version(
+ "tokio",
+ dependencies,
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
);
set_key_value_dependency_version(
@@ -654,13 +769,13 @@ impl ShuttleInit for ShuttleInitWarp {
fn get_boilerplate_code_for_framework(&self) -> &'static str {
indoc! {r#"
- use warp::Filter;
- use warp::Reply;
-
- #[shuttle_service::main]
- async fn warp() -> shuttle_service::ShuttleWarp<(impl Reply,)> {
- let route = warp::any().map(|| "Hello, World");
- Ok(route.boxed())
+ use warp::Filter;
+ use warp::Reply;
+
+ #[shuttle_runtime::main]
+ async fn warp() -> shuttle_warp::ShuttleWarp<(impl Reply,)> {
+ let route = warp::any().map(|| "Hello, World!");
+ Ok(route.boxed().into())
}"#}
}
}
@@ -675,10 +790,13 @@ impl ShuttleInit for ShuttleInitThruster {
url: &Url,
get_dependency_version_fn: GetDependencyVersionFn,
) {
- set_inline_table_dependency_features(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-thruster",
dependencies,
- vec!["web-thruster".to_string()],
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
);
set_inline_table_dependency_version(
@@ -695,6 +813,15 @@ impl ShuttleInit for ShuttleInitThruster {
dependencies,
vec!["hyper_server".to_string()],
);
+
+ set_key_value_dependency_version(
+ "tokio",
+ dependencies,
+ manifest_path,
+ url,
+ true,
+ get_dependency_version_fn,
+ );
}
fn get_boilerplate_code_for_framework(&self) -> &'static str {
@@ -703,20 +830,21 @@ impl ShuttleInit for ShuttleInitThruster {
context::basic_hyper_context::{generate_context, BasicHyperContext as Ctx, HyperRequest},
m, middleware_fn, App, HyperServer, MiddlewareNext, MiddlewareResult, ThrusterServer,
};
-
+
#[middleware_fn]
async fn hello(mut context: Ctx, _next: MiddlewareNext) -> MiddlewareResult {
context.body("Hello, World!");
Ok(context)
}
-
- #[shuttle_service::main]
- async fn thruster() -> shuttle_service::ShuttleThruster> {
- Ok(HyperServer::new(
+
+ #[shuttle_runtime::main]
+ async fn thruster() -> shuttle_thruster::ShuttleThruster> {
+ let server = HyperServer::new(
App::::create(generate_context, ()).get("/hello", m![hello]),
- ))
- }
- "#}
+ );
+
+ Ok(server.into())
+ }"#}
}
}
@@ -736,21 +864,21 @@ impl ShuttleInit for ShuttleInitNoOp {
}
}
-/// Interoprates with `cargo` crate and calls `cargo init --libs [path]`.
+/// Interoprates with `cargo` crate and calls `cargo init [path]`.
pub fn cargo_init(path: PathBuf) -> Result<()> {
- let opts = NewOptions::new(None, false, true, path, None, None, None)?;
+ let opts = NewOptions::new(None, true, false, path, None, None, None)?;
let cargo_config = cargo::util::config::Config::default()?;
let init_result = cargo::ops::init(&opts, &cargo_config)?;
// Mimic `cargo init` behavior and log status or error to shell
cargo_config
.shell()
- .status("Created", format!("{} (shuttle) package", init_result))?;
+ .status("Created", format!("{init_result} (shuttle) package"))?;
Ok(())
}
-/// Performs shuttle init on the existing files generated by `cargo init --libs [path]`.
+/// Performs shuttle init on the existing files generated by `cargo init [path]`.
pub fn cargo_shuttle_init(path: PathBuf, framework: Framework) -> Result<()> {
let cargo_toml_path = path.join("Cargo.toml");
let mut cargo_doc = read_to_string(cargo_toml_path.clone())
@@ -758,36 +886,31 @@ pub fn cargo_shuttle_init(path: PathBuf, framework: Framework) -> Result<()> {
.parse::()
.unwrap();
- // Remove empty dependencies table to re-insert after the lib table is inserted
- cargo_doc.remove("dependencies");
-
- // Create an empty `[lib]` table
- cargo_doc["lib"] = Item::Table(Table::new());
-
// Add publish: false to avoid accidental `cargo publish`
cargo_doc["package"]["publish"] = value(false);
- // Create `[dependencies]` table
- let mut dependencies = Table::new();
+ // Get `[dependencies]` table
+ let dependencies = cargo_doc["dependencies"]
+ .as_table_mut()
+ .expect("manifest to have a dependencies table");
- // Set "shuttle-service" version to `[dependencies]` table
let manifest_path = find(Some(path.as_path())).unwrap();
let url = registry_url(manifest_path.as_path(), None).expect("Could not find registry URL");
- set_inline_table_dependency_version(
- "shuttle-service",
- &mut dependencies,
+ let init_config = framework.init_config();
+
+ set_key_value_dependency_version(
+ "shuttle-runtime",
+ dependencies,
&manifest_path,
&url,
- false,
+ true, // TODO: disallow pre-release when releasing 0.12?
get_latest_dependency_version,
);
- let init_config = framework.init_config();
-
// Set framework-specific dependencies to the `dependencies` table
init_config.set_cargo_dependencies(
- &mut dependencies,
+ dependencies,
&manifest_path,
&url,
get_latest_dependency_version,
@@ -796,14 +919,13 @@ pub fn cargo_shuttle_init(path: PathBuf, framework: Framework) -> Result<()> {
// Truncate Cargo.toml and write the updated `Document` to it
let mut cargo_toml = File::create(cargo_toml_path)?;
- cargo_doc["dependencies"] = Item::Table(dependencies);
cargo_toml.write_all(cargo_doc.to_string().as_bytes())?;
- // Write boilerplate to `src/lib.rs` file
- let lib_path = path.join("src").join("lib.rs");
+ // Write boilerplate to `src/main.rs` file
+ let main_path = path.join("src").join("main.rs");
let boilerplate = init_config.get_boilerplate_code_for_framework();
if !boilerplate.is_empty() {
- write_lib_file(boilerplate, &lib_path)?;
+ write_main_file(boilerplate, &main_path)?;
}
Ok(())
@@ -863,7 +985,7 @@ fn get_latest_dependency_version(
) -> String {
let latest_version =
get_latest_dependency(crate_name, flag_allow_prerelease, manifest_path, Some(url))
- .unwrap_or_else(|_| panic!("Could not query the latest version of {}", crate_name));
+ .unwrap_or_else(|_| panic!("Could not query the latest version of {crate_name}"));
let latest_version = latest_version
.version()
.expect("No latest shuttle-service version available");
@@ -871,10 +993,10 @@ fn get_latest_dependency_version(
latest_version.to_string()
}
-/// Writes `boilerplate` code to the specified `lib.rs` file path.
-pub fn write_lib_file(boilerplate: &'static str, lib_path: &Path) -> Result<()> {
- let mut lib_file = File::create(lib_path)?;
- lib_file.write_all(boilerplate.as_bytes())?;
+/// Writes `boilerplate` code to the specified `main.rs` file path.
+pub fn write_main_file(boilerplate: &'static str, main_path: &Path) -> Result<()> {
+ let mut main_file = File::create(main_path)?;
+ main_file.write_all(boilerplate.as_bytes())?;
Ok(())
}
@@ -908,12 +1030,12 @@ mod shuttle_init_tests {
set_inline_table_dependency_features(
"shuttle-service",
dependencies,
- vec!["test-feature".to_string()],
+ vec!["builder".to_string()],
);
let expected = indoc! {r#"
[dependencies]
- shuttle-service = { features = ["test-feature"] }
+ shuttle-service = { features = ["builder"] }
"#};
assert_eq!(cargo_toml.to_string(), expected);
@@ -973,12 +1095,12 @@ mod shuttle_init_tests {
let manifest_path = PathBuf::new();
let url = Url::parse("https://shuttle.rs").unwrap();
- set_inline_table_dependency_version(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-runtime",
dependencies,
&manifest_path,
&url,
- false,
+ true,
mock_get_latest_dependency_version,
);
@@ -991,8 +1113,10 @@ mod shuttle_init_tests {
let expected = indoc! {r#"
[dependencies]
- shuttle-service = { version = "1.0", features = ["web-actix-web"] }
+ shuttle-runtime = "1.0"
actix-web = "1.0"
+ shuttle-actix-web = "1.0"
+ tokio = "1.0"
"#};
assert_eq!(cargo_toml.to_string(), expected);
@@ -1005,12 +1129,12 @@ mod shuttle_init_tests {
let manifest_path = PathBuf::new();
let url = Url::parse("https://shuttle.rs").unwrap();
- set_inline_table_dependency_version(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-runtime",
dependencies,
&manifest_path,
&url,
- false,
+ true,
mock_get_latest_dependency_version,
);
@@ -1023,9 +1147,10 @@ mod shuttle_init_tests {
let expected = indoc! {r#"
[dependencies]
- shuttle-service = { version = "1.0", features = ["web-axum"] }
+ shuttle-runtime = "1.0"
axum = "1.0"
- sync_wrapper = "1.0"
+ shuttle-axum = "1.0"
+ tokio = "1.0"
"#};
assert_eq!(cargo_toml.to_string(), expected);
@@ -1038,12 +1163,12 @@ mod shuttle_init_tests {
let manifest_path = PathBuf::new();
let url = Url::parse("https://shuttle.rs").unwrap();
- set_inline_table_dependency_version(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-runtime",
dependencies,
&manifest_path,
&url,
- false,
+ true,
mock_get_latest_dependency_version,
);
@@ -1056,8 +1181,10 @@ mod shuttle_init_tests {
let expected = indoc! {r#"
[dependencies]
- shuttle-service = { version = "1.0", features = ["web-rocket"] }
+ shuttle-runtime = "1.0"
rocket = "1.0"
+ shuttle-rocket = "1.0"
+ tokio = "1.0"
"#};
assert_eq!(cargo_toml.to_string(), expected);
@@ -1070,12 +1197,12 @@ mod shuttle_init_tests {
let manifest_path = PathBuf::new();
let url = Url::parse("https://shuttle.rs").unwrap();
- set_inline_table_dependency_version(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-runtime",
dependencies,
&manifest_path,
&url,
- false,
+ true,
mock_get_latest_dependency_version,
);
@@ -1088,7 +1215,9 @@ mod shuttle_init_tests {
let expected = indoc! {r#"
[dependencies]
- shuttle-service = { version = "1.0", features = ["web-tide"] }
+ shuttle-runtime = "1.0"
+ shuttle-tide = "1.0"
+ tokio = "1.0"
tide = "1.0"
"#};
@@ -1102,12 +1231,12 @@ mod shuttle_init_tests {
let manifest_path = PathBuf::new();
let url = Url::parse("https://shuttle.rs").unwrap();
- set_inline_table_dependency_version(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-runtime",
dependencies,
&manifest_path,
&url,
- false,
+ true,
mock_get_latest_dependency_version,
);
@@ -1120,9 +1249,11 @@ mod shuttle_init_tests {
let expected = indoc! {r#"
[dependencies]
- shuttle-service = { version = "1.0", features = ["web-tower"] }
- tower = { version = "1.0", features = ["full"] }
+ shuttle-runtime = "1.0"
hyper = { version = "1.0", features = ["full"] }
+ shuttle-tower = "1.0"
+ tokio = "1.0"
+ tower = { version = "1.0", features = ["full"] }
"#};
assert_eq!(cargo_toml.to_string(), expected);
@@ -1135,12 +1266,12 @@ mod shuttle_init_tests {
let manifest_path = PathBuf::new();
let url = Url::parse("https://shuttle.rs").unwrap();
- set_inline_table_dependency_version(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-runtime",
dependencies,
&manifest_path,
&url,
- false,
+ true,
mock_get_latest_dependency_version,
);
@@ -1153,8 +1284,10 @@ mod shuttle_init_tests {
let expected = indoc! {r#"
[dependencies]
- shuttle-service = { version = "1.0", features = ["web-poem"] }
+ shuttle-runtime = "1.0"
poem = "1.0"
+ shuttle-poem = "1.0"
+ tokio = "1.0"
"#};
assert_eq!(cargo_toml.to_string(), expected);
@@ -1167,12 +1300,12 @@ mod shuttle_init_tests {
let manifest_path = PathBuf::new();
let url = Url::parse("https://shuttle.rs").unwrap();
- set_inline_table_dependency_version(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-runtime",
dependencies,
&manifest_path,
&url,
- false,
+ true,
mock_get_latest_dependency_version,
);
@@ -1185,8 +1318,10 @@ mod shuttle_init_tests {
let expected = indoc! {r#"
[dependencies]
- shuttle-service = { version = "1.0", features = ["web-salvo"] }
+ shuttle-runtime = "1.0"
salvo = "1.0"
+ shuttle-salvo = "1.0"
+ tokio = "1.0"
"#};
assert_eq!(cargo_toml.to_string(), expected);
@@ -1199,12 +1334,12 @@ mod shuttle_init_tests {
let manifest_path = PathBuf::new();
let url = Url::parse("https://shuttle.rs").unwrap();
- set_inline_table_dependency_version(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-runtime",
dependencies,
&manifest_path,
&url,
- false,
+ true,
mock_get_latest_dependency_version,
);
@@ -1217,10 +1352,12 @@ mod shuttle_init_tests {
let expected = indoc! {r#"
[dependencies]
- shuttle-service = { version = "1.0", features = ["bot-serenity"] }
+ shuttle-runtime = "1.0"
anyhow = "1.0"
serenity = { version = "1.0", default-features = false, features = ["client", "gateway", "rustls_backend", "model"] }
shuttle-secrets = "1.0"
+ shuttle-serenity = "1.0"
+ tokio = "1.0"
tracing = "1.0"
"#};
@@ -1234,12 +1371,12 @@ mod shuttle_init_tests {
let manifest_path = PathBuf::new();
let url = Url::parse("https://shuttle.rs").unwrap();
- set_inline_table_dependency_version(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-runtime",
dependencies,
&manifest_path,
&url,
- false,
+ true,
mock_get_latest_dependency_version,
);
@@ -1251,12 +1388,14 @@ mod shuttle_init_tests {
);
let expected = indoc! {r#"
- [dependencies]
- shuttle-service = { version = "1.0", features = ["bot-poise"] }
- anyhow = "1.0"
- poise = "1.0"
- shuttle-secrets = "1.0"
- tracing = "1.0"
+ [dependencies]
+ shuttle-runtime = "1.0"
+ anyhow = "1.0"
+ poise = "1.0"
+ shuttle-poise = "1.0"
+ shuttle-secrets = "1.0"
+ tokio = "1.0"
+ tracing = "1.0"
"#};
assert_eq!(cargo_toml.to_string(), expected);
@@ -1269,12 +1408,12 @@ mod shuttle_init_tests {
let manifest_path = PathBuf::new();
let url = Url::parse("https://shuttle.rs").unwrap();
- set_inline_table_dependency_version(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-runtime",
dependencies,
&manifest_path,
&url,
- false,
+ true,
mock_get_latest_dependency_version,
);
@@ -1287,7 +1426,9 @@ mod shuttle_init_tests {
let expected = indoc! {r#"
[dependencies]
- shuttle-service = { version = "1.0", features = ["web-warp"] }
+ shuttle-runtime = "1.0"
+ shuttle-warp = "1.0"
+ tokio = "1.0"
warp = "1.0"
"#};
@@ -1301,12 +1442,12 @@ mod shuttle_init_tests {
let manifest_path = PathBuf::new();
let url = Url::parse("https://shuttle.rs").unwrap();
- set_inline_table_dependency_version(
- "shuttle-service",
+ set_key_value_dependency_version(
+ "shuttle-runtime",
dependencies,
&manifest_path,
&url,
- false,
+ true,
mock_get_latest_dependency_version,
);
@@ -1319,13 +1460,17 @@ mod shuttle_init_tests {
let expected = indoc! {r#"
[dependencies]
- shuttle-service = { version = "1.0", features = ["web-thruster"] }
+ shuttle-runtime = "1.0"
+ shuttle-thruster = "1.0"
thruster = { version = "1.0", features = ["hyper_server"] }
+ tokio = "1.0"
"#};
assert_eq!(cargo_toml.to_string(), expected);
}
+ // TODO: unignore this test when we publish shuttle-rocket
+ #[ignore]
#[test]
/// Makes sure that Rocket uses allow_prerelease flag when fetching the latest version
fn test_get_latest_dependency_version_rocket() {
@@ -1334,6 +1479,15 @@ mod shuttle_init_tests {
let manifest_path = PathBuf::new();
let url = Url::parse("https://github.com/rust-lang/crates.io-index").unwrap();
+ set_key_value_dependency_version(
+ "shuttle-runtime",
+ dependencies,
+ &manifest_path,
+ &url,
+ true,
+ mock_get_latest_dependency_version,
+ );
+
ShuttleInitRocket.set_cargo_dependencies(
dependencies,
&manifest_path,
diff --git a/cargo-shuttle/src/lib.rs b/cargo-shuttle/src/lib.rs
index 5f97aa675..9463e6b30 100644
--- a/cargo-shuttle/src/lib.rs
+++ b/cargo-shuttle/src/lib.rs
@@ -1,14 +1,16 @@
mod args;
mod client;
pub mod config;
-mod factory;
mod init;
+mod provisioner_server;
+use cargo::util::ToSemver;
use indicatif::ProgressBar;
use shuttle_common::models::project::{State, IDLE_MINUTES};
use shuttle_common::project::ProjectName;
+use shuttle_proto::runtime::{self, LoadRequest, StartRequest, SubscribeLogsRequest};
-use std::collections::BTreeMap;
+use std::collections::HashMap;
use std::ffi::OsString;
use std::fs::{read_to_string, File};
use std::io::stdout;
@@ -24,25 +26,26 @@ use clap_complete::{generate, Shell};
use config::RequestContext;
use crossterm::style::Stylize;
use dialoguer::{theme::ColorfulTheme, Confirm, FuzzySelect, Input, Password};
-use factory::LocalFactory;
use flate2::write::GzEncoder;
use flate2::Compression;
-use futures::StreamExt;
+use futures::{StreamExt, TryFutureExt};
use git2::{Repository, StatusOptions};
use ignore::overrides::OverrideBuilder;
use ignore::WalkBuilder;
use shuttle_common::models::{project, secret};
-use shuttle_service::loader::{build_crate, Loader};
-use shuttle_service::Logger;
+use shuttle_service::builder::{build_crate, Runtime};
use std::fmt::Write;
use strum::IntoEnumIterator;
use tar::Builder;
-use tokio::sync::mpsc;
-use tracing::trace;
+use tracing::{trace, warn};
use uuid::Uuid;
use crate::args::{DeploymentCommand, ProjectCommand};
use crate::client::Client;
+use crate::provisioner_server::LocalProvisioner;
+
+const VERSION: &str = env!("CARGO_PKG_VERSION");
+const MANIFEST_DIR: &str = env!("CARGO_MANIFEST_DIR");
pub struct Shuttle {
ctx: RequestContext,
@@ -133,9 +136,9 @@ impl Shuttle {
println!("First, let's log in to your Shuttle account.");
self.login(args.login_args.clone()).await?;
println!();
- } else if args.new && args.login_args.api_key.is_some() {
+ } else if args.login_args.api_key.is_some() {
self.login(args.login_args.clone()).await?;
- } else {
+ } else if args.new {
bail!("Tried to login to create a Shuttle environment, but no API key was set.")
}
}
@@ -154,11 +157,17 @@ impl Shuttle {
// 3. Confirm the project directory
let path = if interactive {
+ let path = args
+ .path
+ .to_str()
+ .context("path arg should always be set")?;
+
println!("Where should we create this project?");
let directory_str: String = Input::with_theme(&theme)
.with_prompt("Directory")
- .default(".".to_owned())
+ .default(path.to_owned())
.interact()?;
+
println!();
args::parse_init_path(OsString::from(directory_str))?
} else {
@@ -413,7 +422,6 @@ impl Shuttle {
});
let working_directory = self.ctx.working_directory();
- let id = Default::default();
trace!("building project");
println!(
@@ -422,7 +430,7 @@ impl Shuttle {
working_directory.display()
);
- let so_path = build_crate(id, working_directory, run_args.release, tx).await?;
+ let runtime = build_crate(working_directory, run_args.release, tx).await?;
trace!("loading secrets");
@@ -432,26 +440,137 @@ impl Shuttle {
working_directory.join("Secrets.toml")
};
- let secrets: BTreeMap =
- if let Ok(secrets_str) = read_to_string(secrets_path) {
- let secrets: BTreeMap =
- secrets_str.parse::()?.try_into()?;
+ let secrets: HashMap = if let Ok(secrets_str) = read_to_string(secrets_path)
+ {
+ let secrets: HashMap =
+ secrets_str.parse::()?.try_into()?;
- trace!(keys = ?secrets.keys(), "available secrets");
+ trace!(keys = ?secrets.keys(), "available secrets");
- secrets
- } else {
- trace!("no Secrets.toml was found");
- Default::default()
- };
+ secrets
+ } else {
+ trace!("no Secrets.toml was found");
+ Default::default()
+ };
+
+ let service_name = self.ctx.project_name().to_string();
- let loader = Loader::from_so_file(so_path)?;
+ let (is_wasm, executable_path) = match runtime {
+ Runtime::Next(path) => (true, path),
+ Runtime::Alpha(path) => (false, path),
+ };
+
+ let provisioner = LocalProvisioner::new()?;
+ let provisioner_server = provisioner.start(SocketAddr::new(
+ Ipv4Addr::LOCALHOST.into(),
+ run_args.port + 1,
+ ));
+
+ let runtime_path = || {
+ if is_wasm {
+ let runtime_path = home::cargo_home()
+ .expect("failed to find cargo home dir")
+ .join("bin/shuttle-next");
+
+ println!("Installing shuttle runtime. This can take a while...");
+
+ if cfg!(debug_assertions) {
+ // Canonicalized path to shuttle-runtime for dev to work on windows
+ let path = std::fs::canonicalize(format!("{MANIFEST_DIR}/../runtime"))
+ .expect("path to shuttle-runtime does not exist or is invalid");
+
+ trace!(?path, "installing runtime from local filesystem");
+
+ std::process::Command::new("cargo")
+ .arg("install")
+ .arg("shuttle-runtime")
+ .arg("--path")
+ .arg(path)
+ .arg("--bin")
+ .arg("shuttle-next")
+ .arg("--features")
+ .arg("next")
+ .output()
+ .expect("failed to install the shuttle runtime");
+ } else {
+ // If the version of cargo-shuttle is different from shuttle-runtime,
+ // or it isn't installed, try to install shuttle-runtime from crates.io.
+ if let Err(err) = check_version(&runtime_path) {
+ warn!("{}", err);
+
+ trace!("installing shuttle-runtime");
+ std::process::Command::new("cargo")
+ .arg("install")
+ .arg("shuttle-runtime")
+ .arg("--bin")
+ .arg("shuttle-next")
+ .arg("--features")
+ .arg("next")
+ .output()
+ .expect("failed to install the shuttle runtime");
+ };
+ };
+
+ runtime_path
+ } else {
+ trace!(path = ?executable_path, "using alpha runtime");
+ executable_path.clone()
+ }
+ };
- let mut factory = LocalFactory::new(
- self.ctx.project_name().clone(),
+ let (mut runtime, mut runtime_client) = runtime::start(
+ is_wasm,
+ runtime::StorageManagerType::WorkingDir(working_directory.to_path_buf()),
+ &format!("http://localhost:{}", run_args.port + 1),
+ None,
+ run_args.port + 2,
+ runtime_path,
+ )
+ .await
+ .map_err(|err| {
+ provisioner_server.abort();
+
+ err
+ })?;
+
+ let load_request = tonic::Request::new(LoadRequest {
+ path: executable_path
+ .into_os_string()
+ .into_string()
+ .expect("to convert path to string"),
+ service_name: service_name.clone(),
+ resources: Default::default(),
secrets,
- working_directory.to_path_buf(),
- )?;
+ });
+ trace!("loading service");
+ let _ = runtime_client
+ .load(load_request)
+ .or_else(|err| async {
+ provisioner_server.abort();
+ runtime.kill().await?;
+
+ Err(err)
+ })
+ .await?;
+
+ let mut stream = runtime_client
+ .subscribe_logs(tonic::Request::new(SubscribeLogsRequest {}))
+ .or_else(|err| async {
+ provisioner_server.abort();
+ runtime.kill().await?;
+
+ Err(err)
+ })
+ .await?
+ .into_inner();
+
+ tokio::spawn(async move {
+ while let Ok(Some(log)) = stream.message().await {
+ let log: shuttle_common::LogItem = log.try_into().expect("to convert log");
+ println!("{log}");
+ }
+ });
+
let addr = if run_args.external {
std::net::IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0))
} else {
@@ -460,30 +579,32 @@ impl Shuttle {
let addr = SocketAddr::new(addr, run_args.port);
- trace!("loading project");
+ let start_request = StartRequest {
+ ip: addr.to_string(),
+ };
+
+ trace!(?start_request, "starting service");
+ let response = runtime_client
+ .start(tonic::Request::new(start_request))
+ .or_else(|err| async {
+ provisioner_server.abort();
+ runtime.kill().await?;
+
+ Err(err)
+ })
+ .await?
+ .into_inner();
+
+ trace!(response = ?response, "client response: ");
+
println!(
"\n{:>12} {} on http://{}",
"Starting".bold().green(),
self.ctx.project_name(),
addr
);
- let (tx, mut rx) = mpsc::unbounded_channel();
- tokio::spawn(async move {
- while let Some(log) = rx.recv().await {
- println!("{log}");
- }
- });
-
- let logger = Logger::new(tx, id);
- let (handle, so) = loader.load(&mut factory, addr, logger).await?;
-
- handle.await??;
-
- tokio::task::spawn_blocking(move || {
- trace!("closing so file");
- so.close().unwrap();
- });
+ runtime.wait().await?;
Ok(())
}
@@ -768,6 +889,40 @@ impl Shuttle {
}
}
+fn check_version(runtime_path: &Path) -> Result<()> {
+ let valid_version = VERSION.to_semver().unwrap();
+
+ if !runtime_path.try_exists()? {
+ bail!("shuttle-runtime is not installed");
+ }
+
+ // Get runtime version from shuttle-runtime cli
+ let runtime_version = std::process::Command::new("cargo")
+ .arg("shuttle-runtime")
+ .arg("--version")
+ .output()
+ .context("failed to check the shuttle-runtime version")?
+ .stdout;
+
+ // Parse the version, splitting the version from the name and
+ // and pass it to `to_semver()`.
+ let runtime_version = std::str::from_utf8(&runtime_version)
+ .expect("shuttle-runtime version should be valid utf8")
+ .split_once(' ')
+ .expect("shuttle-runtime version should be in the `name version` format")
+ .1
+ .to_semver()
+ .context("failed to convert runtime version to semver")?;
+
+ if runtime_version == valid_version {
+ Ok(())
+ } else {
+ Err(anyhow!(
+ "shuttle-runtime and cargo-shuttle are not the same version"
+ ))
+ }
+}
+
fn create_spinner() -> ProgressBar {
let pb = indicatif::ProgressBar::new_spinner();
pb.enable_steady_tick(std::time::Duration::from_millis(350));
@@ -899,7 +1054,7 @@ mod tests {
"Secrets.toml",
"Secrets.toml.example",
"Shuttle.toml",
- "src/lib.rs",
+ "src/main.rs",
]
);
}
diff --git a/cargo-shuttle/src/factory.rs b/cargo-shuttle/src/provisioner_server.rs
similarity index 84%
rename from cargo-shuttle/src/factory.rs
rename to cargo-shuttle/src/provisioner_server.rs
index fdbf12c57..3981c70f2 100644
--- a/cargo-shuttle/src/factory.rs
+++ b/cargo-shuttle/src/provisioner_server.rs
@@ -9,55 +9,53 @@ use bollard::{
};
use crossterm::{
cursor::{MoveDown, MoveUp},
- style::Stylize,
terminal::{Clear, ClearType},
QueueableCommand,
};
use futures::StreamExt;
use portpicker::pick_unused_port;
-use shuttle_common::{
- database::{AwsRdsEngine, SharedEngine},
- DatabaseReadyInfo,
+use shuttle_common::database::{AwsRdsEngine, SharedEngine};
+use shuttle_proto::provisioner::{
+ provisioner_server::{Provisioner, ProvisionerServer},
+ DatabaseDeletionResponse, DatabaseRequest, DatabaseResponse,
};
-use shuttle_service::{database::Type, error::CustomError, Environment, Factory, ServiceName};
-use std::{
- collections::{BTreeMap, HashMap},
- io::stdout,
- path::PathBuf,
- time::Duration,
+use shuttle_service::database::Type;
+use std::{collections::HashMap, io::stdout, net::SocketAddr, time::Duration};
+use tokio::{task::JoinHandle, time::sleep};
+use tonic::{
+ transport::{self, Server},
+ Request, Response, Status,
};
-use tokio::time::sleep;
use tracing::{error, trace};
-pub struct LocalFactory {
+/// A provisioner for local runs
+/// It uses Docker to create Databases
+pub struct LocalProvisioner {
docker: Docker,
- service_name: ServiceName,
- secrets: BTreeMap,
- working_directory: PathBuf,
}
-impl LocalFactory {
- pub fn new(
- service_name: ServiceName,
- secrets: BTreeMap,
- working_directory: PathBuf,
- ) -> Result {
+impl LocalProvisioner {
+ pub fn new() -> Result {
Ok(Self {
docker: Docker::connect_with_local_defaults()?,
- service_name,
- secrets,
- working_directory,
})
}
-}
-#[async_trait]
-impl Factory for LocalFactory {
+ pub fn start(self, address: SocketAddr) -> JoinHandle> {
+ tokio::spawn(async move {
+ Server::builder()
+ .add_service(ProvisionerServer::new(self))
+ .serve(address)
+ .await
+ })
+ }
+
async fn get_db_connection_string(
- &mut self,
+ &self,
+ service_name: &str,
db_type: Type,
- ) -> Result {
- trace!("getting sql string for service '{}'", self.service_name);
+ ) -> Result {
+ trace!("getting sql string for service '{}'", service_name);
let EngineConfig {
r#type,
@@ -70,7 +68,7 @@ impl Factory for LocalFactory {
env,
is_ready_cmd,
} = db_type_to_config(db_type);
- let container_name = format!("shuttle_{}_{}", self.service_name, r#type);
+ let container_name = format!("shuttle_{service_name}_{type}");
let container = match self.docker.inspect_container(&container_name, None).await {
Ok(container) => {
@@ -118,7 +116,7 @@ impl Factory for LocalFactory {
}
Err(error) => {
error!("got unexpected error while inspecting docker container: {error}");
- return Err(shuttle_service::Error::Custom(CustomError::new(error)));
+ return Err(Status::internal(error.to_string()));
}
};
@@ -153,56 +151,24 @@ impl Factory for LocalFactory {
self.wait_for_ready(&container_name, is_ready_cmd).await?;
- let db_info = DatabaseReadyInfo::new(
+ let res = DatabaseResponse {
engine,
username,
password,
database_name,
port,
- "localhost".to_string(),
- "localhost".to_string(),
- );
-
- let conn_str = db_info.connection_string_private();
-
- println!(
- "{:>12} can be reached at {}\n",
- "DB ready".bold().cyan(),
- conn_str
- );
-
- Ok(conn_str)
- }
-
- async fn get_secrets(
- &mut self,
- ) -> Result, shuttle_service::Error> {
- Ok(self.secrets.clone())
- }
-
- fn get_service_name(&self) -> ServiceName {
- self.service_name.clone()
- }
-
- fn get_environment(&self) -> Environment {
- Environment::Local
- }
-
- fn get_build_path(&self) -> Result {
- Ok(self.working_directory.clone())
- }
+ address_private: "localhost".to_string(),
+ address_public: "localhost".to_string(),
+ };
- fn get_storage_path(&self) -> Result {
- Ok(self.working_directory.clone())
+ Ok(res)
}
-}
-impl LocalFactory {
async fn wait_for_ready(
&self,
container_name: &str,
is_ready_cmd: Vec,
- ) -> Result<(), shuttle_service::Error> {
+ ) -> Result<(), Status> {
loop {
trace!("waiting for '{container_name}' to be ready for connections");
@@ -280,6 +246,34 @@ impl LocalFactory {
}
}
+#[async_trait]
+impl Provisioner for LocalProvisioner {
+ async fn provision_database(
+ &self,
+ request: Request,
+ ) -> Result, Status> {
+ let DatabaseRequest {
+ project_name,
+ db_type,
+ } = request.into_inner();
+
+ let db_type: Option = db_type.unwrap().into();
+
+ let res = self
+ .get_db_connection_string(&project_name, db_type.unwrap())
+ .await?;
+
+ Ok(Response::new(res))
+ }
+
+ async fn delete_database(
+ &self,
+ _request: Request,
+ ) -> Result, Status> {
+ panic!("local runner should not try to delete databases");
+ }
+}
+
fn print_layers(layers: &Vec) {
for info in layers {
stdout()
@@ -303,7 +297,7 @@ fn print_layers(layers: &Vec) {
(Some(status), _) => status.to_string(),
_ => "Unknown".to_string(),
};
- println!("[{id} {}]", text);
+ println!("[{id} {text}]");
} else {
println!(
"{}",
diff --git a/cargo-shuttle/tests/integration/init.rs b/cargo-shuttle/tests/integration/init.rs
index 45551314a..223987b5b 100644
--- a/cargo-shuttle/tests/integration/init.rs
+++ b/cargo-shuttle/tests/integration/init.rs
@@ -27,9 +27,10 @@ async fn non_interactive_basic_init() {
Shuttle::new().unwrap().run(args).await.unwrap();
let cargo_toml = read_to_string(temp_dir_path.join("Cargo.toml")).unwrap();
+
// Expected: name = "basic-initRANDOM_CHARS"
assert!(cargo_toml.contains("name = \"basic-init"));
- assert!(cargo_toml.contains("shuttle-service = { version = "));
+ assert!(cargo_toml.contains("shuttle-runtime = "));
}
#[tokio::test]
@@ -167,11 +168,10 @@ fn interactive_rocket_init_dont_prompt_name() -> Result<(), Box shuttle_service::ShuttleRocket {
+ #[shuttle_runtime::main]
+ async fn rocket() -> shuttle_rocket::ShuttleRocket {
let rocket = rocket::build().mount("/hello", routes![index]);
- Ok(rocket)
+ Ok(rocket.into())
}"#};
- assert_eq!(lib_file, expected);
+ assert_eq!(main_file, expected);
}
diff --git a/cargo-shuttle/tests/integration/run.rs b/cargo-shuttle/tests/integration/run.rs
index e11dbe3dd..311b78385 100644
--- a/cargo-shuttle/tests/integration/run.rs
+++ b/cargo-shuttle/tests/integration/run.rs
@@ -58,6 +58,7 @@ async fn cargo_shuttle_run(working_directory: &str, external: bool) -> String {
}
#[tokio::test(flavor = "multi_thread")]
+#[ignore]
async fn rocket_hello_world() {
let url = cargo_shuttle_run("../examples/rocket/hello-world", false).await;
@@ -91,6 +92,7 @@ async fn rocket_secrets() {
// This example uses a shared Postgres. Thus local runs should create a docker container for it.
#[tokio::test(flavor = "multi_thread")]
+#[ignore]
async fn rocket_postgres() {
let url = cargo_shuttle_run("../examples/rocket/postgres", false).await;
let client = reqwest::Client::new();
@@ -120,6 +122,59 @@ async fn rocket_postgres() {
}
#[tokio::test(flavor = "multi_thread")]
+async fn axum_static_files() {
+ let url = cargo_shuttle_run("../examples/axum/static-files", false).await;
+ let client = reqwest::Client::new();
+
+ let request_text = client
+ .get(format!("{url}/hello"))
+ .send()
+ .await
+ .unwrap()
+ .text()
+ .await
+ .unwrap();
+
+ assert_eq!(request_text, "Hello, world!");
+
+ let request_text = client.get(url).send().await.unwrap().text().await.unwrap();
+
+ assert!(
+ request_text.contains("This is an example of serving static files with axum and shuttle.")
+ );
+}
+
+#[tokio::test(flavor = "multi_thread")]
+async fn shuttle_next() {
+ let url = cargo_shuttle_run("../examples/next/hello-world", false).await;
+ let client = reqwest::Client::new();
+
+ let request_text = client
+ .get(format!("{url}/hello"))
+ .send()
+ .await
+ .unwrap()
+ .text()
+ .await
+ .unwrap();
+
+ assert_eq!(request_text, "Hello, World!");
+
+ let post_text = client
+ .post(format!("{url}/uppercase"))
+ .body("uppercase this")
+ .send()
+ .await
+ .unwrap()
+ .text()
+ .await
+ .unwrap();
+
+ assert_eq!(post_text, "UPPERCASE THIS");
+}
+
+#[tokio::test(flavor = "multi_thread")]
+#[ignore]
async fn rocket_authentication() {
let url = cargo_shuttle_run("../examples/rocket/authentication", false).await;
let client = reqwest::Client::new();
@@ -176,6 +231,7 @@ async fn rocket_authentication() {
}
#[tokio::test(flavor = "multi_thread")]
+#[ignore]
async fn actix_web_hello_world() {
let url = cargo_shuttle_run("../examples/actix-web/hello-world", false).await;
@@ -192,6 +248,7 @@ async fn actix_web_hello_world() {
}
#[tokio::test(flavor = "multi_thread")]
+#[ignore]
async fn axum_hello_world() {
let url = cargo_shuttle_run("../examples/axum/hello-world", false).await;
@@ -208,6 +265,7 @@ async fn axum_hello_world() {
}
#[tokio::test(flavor = "multi_thread")]
+#[ignore]
async fn tide_hello_world() {
let url = cargo_shuttle_run("../examples/tide/hello-world", false).await;
@@ -224,6 +282,7 @@ async fn tide_hello_world() {
}
#[tokio::test(flavor = "multi_thread")]
+#[ignore]
async fn tower_hello_world() {
let url = cargo_shuttle_run("../examples/tower/hello-world", false).await;
@@ -240,6 +299,7 @@ async fn tower_hello_world() {
}
#[tokio::test(flavor = "multi_thread")]
+#[ignore]
async fn warp_hello_world() {
let url = cargo_shuttle_run("../examples/warp/hello-world", false).await;
@@ -256,6 +316,7 @@ async fn warp_hello_world() {
}
#[tokio::test(flavor = "multi_thread")]
+#[ignore]
async fn poem_hello_world() {
let url = cargo_shuttle_run("../examples/poem/hello-world", false).await;
@@ -336,6 +397,7 @@ async fn poem_mongodb() {
}
#[tokio::test(flavor = "multi_thread")]
+#[ignore]
async fn salvo_hello_world() {
let url = cargo_shuttle_run("../examples/salvo/hello-world", false).await;
@@ -352,6 +414,7 @@ async fn salvo_hello_world() {
}
#[tokio::test(flavor = "multi_thread")]
+#[ignore]
async fn thruster_hello_world() {
let url = cargo_shuttle_run("../examples/thruster/hello-world", false).await;
diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml
index 51c56149d..9db8929d3 100644
--- a/codegen/Cargo.toml
+++ b/codegen/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "shuttle-codegen"
-version = "0.11.0"
+version = "0.12.0"
edition.workspace = true
license.workspace = true
repository.workspace = true
@@ -19,3 +19,7 @@ syn = { version = "1.0.104", features = ["full", "extra-traits"] }
[dev-dependencies]
pretty_assertions = "1.3.0"
trybuild = "1.0.72"
+
+[features]
+frameworks = []
+next = []
diff --git a/codegen/src/lib.rs b/codegen/src/lib.rs
index fd88d6267..eddf72e07 100644
--- a/codegen/src/lib.rs
+++ b/codegen/src/lib.rs
@@ -1,10 +1,33 @@
+#[cfg(feature = "next")]
+mod next;
+#[cfg(feature = "frameworks")]
mod shuttle_main;
use proc_macro::TokenStream;
use proc_macro_error::proc_macro_error;
+#[cfg(feature = "frameworks")]
#[proc_macro_error]
#[proc_macro_attribute]
pub fn main(attr: TokenStream, item: TokenStream) -> TokenStream {
shuttle_main::r#impl(attr, item)
}
+
+#[cfg(feature = "next")]
+#[proc_macro_error]
+#[proc_macro]
+pub fn app(item: TokenStream) -> TokenStream {
+ use next::App;
+ use syn::{parse_macro_input, File};
+
+ let mut file = parse_macro_input!(item as File);
+
+ let app = App::from_file(&mut file);
+ let bindings = next::wasi_bindings(app);
+
+ quote::quote!(
+ #file
+ #bindings
+ )
+ .into()
+}
diff --git a/codegen/src/next/mod.rs b/codegen/src/next/mod.rs
new file mode 100644
index 000000000..4f62b12e1
--- /dev/null
+++ b/codegen/src/next/mod.rs
@@ -0,0 +1,641 @@
+use std::collections::HashMap;
+
+use proc_macro_error::emit_error;
+use quote::{quote, ToTokens};
+use syn::{
+ parenthesized, parse::Parse, parse2, punctuated::Punctuated, token::Paren, Expr, ExprLit, File,
+ Ident, Item, ItemFn, Lit, LitStr, Token,
+};
+
+#[derive(Debug, Eq, PartialEq)]
+struct Endpoint {
+ route: LitStr,
+ method: Ident,
+ function: Ident,
+}
+
+#[derive(Debug, Eq, PartialEq)]
+struct Parameter {
+ key: Ident,
+ equals: Token![=],
+ value: Expr,
+}
+
+#[derive(Debug, Eq, PartialEq)]
+struct Params {
+ params: Punctuated,
+ paren_token: Paren,
+}
+
+impl Parse for Parameter {
+ fn parse(input: syn::parse::ParseStream) -> syn::Result {
+ Ok(Self {
+ key: input.parse()?,
+ equals: input.parse()?,
+ value: input.parse()?,
+ })
+ }
+}
+
+impl Parse for Params {
+ fn parse(input: syn::parse::ParseStream) -> syn::Result {
+ let content;
+ Ok(Self {
+ paren_token: parenthesized!(content in input),
+ params: content.parse_terminated(Parameter::parse)?,
+ })
+ }
+}
+
+impl Endpoint {
+ fn from_item_fn(item: &mut ItemFn) -> Option {
+ let function = item.sig.ident.clone();
+
+ let mut endpoint_index = None;
+
+ // Find the index of an attribute that is an endpoint
+ for index in 0..item.attrs.len() {
+ // The endpoint ident should be the last segment in the path
+ if let Some(segment) = item.attrs[index].path.segments.last() {
+ if segment.ident.to_string().as_str() == "endpoint" {
+ // TODO: we should allow multiple endpoint attributes per handler.
+ // We could refactor this to return a Vec and then check
+ // that the combination of endpoints is valid.
+ if endpoint_index.is_some() {
+ emit_error!(
+ item,
+ "extra endpoint attribute";
+ hint = "There should only be one endpoint annotation per handler function."
+ );
+ return None;
+ }
+ endpoint_index = Some(index);
+ }
+ } else {
+ return None;
+ }
+ }
+
+ // Strip the endpoint attribute if it exists
+ let endpoint = if let Some(index) = endpoint_index {
+ item.attrs.remove(index)
+ } else {
+ // This item does not have an endpoint attribute
+ return None;
+ };
+
+ // Parse the endpoint's parameters
+ let params: Params = match parse2(endpoint.tokens) {
+ Ok(params) => params,
+ Err(err) => {
+ // This will error on invalid parameter syntax
+ emit_error!(err.span(), err);
+ return None;
+ }
+ };
+
+ // We'll use the paren span for errors later
+ let paren = params.paren_token;
+
+ if params.params.is_empty() {
+ emit_error!(
+ paren.span,
+ "missing endpoint arguments";
+ hint = "The endpoint takes two arguments: `endpoint(method = get, route = \"/hello\")`"
+ );
+ return None;
+ }
+
+ // At this point an endpoint with params and valid syntax exists, so we will check for
+ // all errors before returning
+ let mut has_err = false;
+
+ let mut route = None;
+ let mut method = None;
+
+ for Parameter { key, value, .. } in params.params {
+ let key_ident = key.clone();
+ match key.to_string().as_str() {
+ "method" => {
+ if method.is_some() {
+ emit_error!(
+ key_ident,
+ "duplicate endpoint method";
+ hint = "The endpoint `method` should only be set once."
+ );
+ has_err = true;
+ }
+ if let Expr::Path(path) = value {
+ let method_ident = path.path.segments[0].ident.clone();
+
+ match method_ident.to_string().as_str() {
+ "get" | "post" | "delete" | "put" | "options" | "head" | "trace"
+ | "patch" => {
+ method = Some(method_ident);
+ }
+ _ => {
+ emit_error!(
+ method_ident,
+ "method is not supported";
+ hint = "Try one of the following: `get`, `post`, `delete`, `put`, `options`, `head`, `trace` or `patch`"
+ );
+ has_err = true;
+ }
+ };
+ };
+ }
+ "route" => {
+ if route.is_some() {
+ emit_error!(
+ key_ident,
+ "duplicate endpoint route";
+ hint = "The endpoint `route` should only be set once."
+ );
+ has_err = true;
+ }
+
+ if let Expr::Lit(ExprLit {
+ lit: Lit::Str(literal),
+ ..
+ }) = value
+ {
+ route = Some(literal);
+ }
+ }
+ _ => {
+ emit_error!(
+ key_ident,
+ "invalid endpoint argument";
+ hint = "Only `method` and `route` are valid endpoint arguments."
+ );
+ has_err = true;
+ }
+ }
+ }
+
+ if route.is_none() {
+ emit_error!(
+ paren.span,
+ "no route provided";
+ hint = "Add a route to your endpoint: `route = \"/hello\")`"
+ );
+ has_err = true;
+ };
+
+ if method.is_none() {
+ emit_error!(
+ paren.span,
+ "no method provided";
+ hint = "Add a method to your endpoint: `method = get`"
+ );
+ has_err = true;
+ };
+
+ if has_err {
+ None
+ } else {
+ // Safe to unwrap because `has_err` is true if `route` or `method` is `None`
+ Some(Endpoint {
+ route: route.unwrap(),
+ method: method.unwrap(),
+ function,
+ })
+ }
+ }
+}
+
+#[derive(Debug, Eq, PartialEq)]
+pub struct EndpointChain<'a> {
+ route: &'a LitStr,
+ handlers: Vec,
+}
+
+#[derive(Debug, Eq, PartialEq)]
+struct Handler {
+ method: Ident,
+ function: Ident,
+}
+
+impl ToTokens for Endpoint {
+ fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {
+ let Self {
+ route,
+ method,
+ function,
+ } = self;
+
+ let route = quote!(.route(#route, #method(#function)));
+
+ route.to_tokens(tokens);
+ }
+}
+
+impl ToTokens for Handler {
+ fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {
+ let Self { method, function } = self;
+
+ let handler = quote!(#method(#function));
+
+ handler.to_tokens(tokens);
+ }
+}
+
+impl<'a> ToTokens for EndpointChain<'a> {
+ fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {
+ let Self { route, handlers } = self;
+
+ let route = quote!(.route(#route, shuttle_next::routing::#(#handlers).*));
+
+ route.to_tokens(tokens);
+ }
+}
+
+#[derive(Debug, Eq, PartialEq)]
+pub(crate) struct App {
+ endpoints: Vec,
+}
+
+impl App {
+ pub(crate) fn from_file(file: &mut File) -> Self {
+ let endpoints = file
+ .items
+ .iter_mut()
+ .filter_map(|item| {
+ if let Item::Fn(item_fn) = item {
+ Some(item_fn)
+ } else {
+ None
+ }
+ })
+ .filter_map(Endpoint::from_item_fn)
+ .collect();
+
+ Self { endpoints }
+ }
+}
+
+impl ToTokens for App {
+ fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {
+ let Self { endpoints } = self;
+
+ let mut endpoint_chains = endpoints
+ .iter()
+ .fold(HashMap::new(), |mut chain, endpoint| {
+ let entry = chain
+ .entry(&endpoint.route)
+ .or_insert_with(Vec::::new);
+
+ let method = endpoint.method.clone();
+ let function = endpoint.function.clone();
+
+ if entry.iter().any(|handler| handler.method == method) {
+ emit_error!(
+ method,
+ "only one method of each type is allowed per route";
+ hint = format!("Remove one of the {} methods on the \"{}\" route.", method, endpoint.route.value())
+ );
+ } else {
+ entry.push(Handler { method, function });
+ }
+
+ chain
+ })
+ .into_iter()
+ .map(|(key, value)| EndpointChain {
+ route: key,
+ handlers: value,
+ })
+ .collect::>();
+
+ // syn::LitStr does not implement Ord, so rather than using a BTreeMap to build the chains, we
+ // use a HashMap and then sort the endpoint chains to ensure the output is deterministic.
+ endpoint_chains.sort_by(|a, b| a.route.value().cmp(&b.route.value()));
+
+ let app = quote!(
+ async fn __app(request: shuttle_next::Request,) -> shuttle_next::response::Response
+ {
+ use shuttle_next::Service;
+
+ let mut router = shuttle_next::Router::new()
+ #(#endpoint_chains)*;
+
+ let response = router.call(request).await.unwrap();
+
+ response
+ }
+ );
+
+ app.to_tokens(tokens);
+ }
+}
+
+pub(crate) fn wasi_bindings(app: App) -> proc_macro2::TokenStream {
+ quote!(
+ #app
+
+ #[cfg(not(test))]
+ #[no_mangle]
+ #[allow(non_snake_case)]
+ pub extern "C" fn __SHUTTLE_Axum_call(
+ logs_fd: std::os::wasi::prelude::RawFd,
+ parts_fd: std::os::wasi::prelude::RawFd,
+ body_fd: std::os::wasi::prelude::RawFd,
+ ) {
+ use shuttle_next::body::{Body, HttpBody};
+ use shuttle_next::tracing_prelude::*;
+ use shuttle_next::Logger;
+ use std::io::{Read, Write};
+ use std::os::wasi::io::FromRawFd;
+
+ // file descriptor 2 for writing logs to
+ let logs_fd = unsafe { std::fs::File::from_raw_fd(logs_fd) };
+
+ shuttle_next::tracing_registry()
+ .with(Logger::new(logs_fd))
+ .init(); // this sets the subscriber as the global default and also adds a compatibility layer for capturing `log::Record`s
+
+ // file descriptor 3 for reading and writing http parts
+ let mut parts_fd = unsafe { std::fs::File::from_raw_fd(parts_fd) };
+
+ let reader = std::io::BufReader::new(&mut parts_fd);
+
+ // deserialize request parts from rust messagepack
+ let wrapper: shuttle_next::RequestWrapper = shuttle_next::from_read(reader).unwrap();
+
+ // file descriptor 4 for reading and writing http body
+ let mut body_stream = unsafe { std::fs::File::from_raw_fd(body_fd) };
+
+ let mut reader = std::io::BufReader::new(&mut body_stream);
+ let mut body_buf = Vec::new();
+ reader.read_to_end(&mut body_buf).unwrap();
+
+ let body = Body::from(body_buf);
+
+ let request = wrapper
+ .into_request_builder()
+ .body(shuttle_next::body::boxed(body))
+ .unwrap();
+
+ let res = shuttle_next::block_on(__app(request));
+
+ let (parts, mut body) = res.into_parts();
+
+ // wrap and serialize response parts as rmp
+ let response_parts = shuttle_next::ResponseWrapper::from(parts)
+ .into_rmp()
+ .expect("failed to serialize response parts");
+
+ // write response parts
+ parts_fd.write_all(&response_parts).unwrap();
+
+ // write body if there is one
+ if let Some(body) = shuttle_next::block_on(body.data()) {
+ body_stream.write_all(body.unwrap().as_ref()).unwrap();
+ }
+ }
+ )
+}
+
+#[cfg(test)]
+mod tests {
+ use pretty_assertions::assert_eq;
+ use quote::quote;
+ use syn::parse_quote;
+
+ use crate::next::{App, Parameter};
+
+ use super::{Endpoint, Params};
+
+ #[test]
+ fn endpoint_to_token() {
+ let endpoint = Endpoint {
+ route: parse_quote!("/hello"),
+ method: parse_quote!(get),
+ function: parse_quote!(hello),
+ };
+
+ let actual = quote!(#endpoint);
+ let expected = quote!(.route("/hello", get(hello)));
+
+ assert_eq!(actual.to_string(), expected.to_string());
+ }
+
+ #[test]
+ #[rustfmt::skip::macros(quote)]
+ fn app_to_token() {
+ let cases = vec![
+ (
+ App {
+ endpoints: vec![
+ Endpoint {
+ route: parse_quote!("/hello"),
+ method: parse_quote!(get),
+ function: parse_quote!(hello),
+ },
+ Endpoint {
+ route: parse_quote!("/goodbye"),
+ method: parse_quote!(post),
+ function: parse_quote!(goodbye),
+ },
+ ],
+ },
+ quote!(
+ async fn __app(
+ request: shuttle_next::Request,
+ ) -> shuttle_next::response::Response {
+ use shuttle_next::Service;
+
+ let mut router = shuttle_next::Router::new()
+ .route("/goodbye", shuttle_next::routing::post(goodbye))
+ .route("/hello", shuttle_next::routing::get(hello));
+
+ let response = router.call(request).await.unwrap();
+
+ response
+ }
+ ),
+ ),
+ (
+ App {
+ endpoints: vec![
+ Endpoint {
+ route: parse_quote!("/hello"),
+ method: parse_quote!(get),
+ function: parse_quote!(hello),
+ },
+ Endpoint {
+ route: parse_quote!("/goodbye"),
+ method: parse_quote!(get),
+ function: parse_quote!(get_goodbye),
+ },
+ Endpoint {
+ route: parse_quote!("/goodbye"),
+ method: parse_quote!(post),
+ function: parse_quote!(post_goodbye),
+ },
+ ],
+ },
+ quote!(
+ async fn __app(
+ request: shuttle_next::Request,
+ ) -> shuttle_next::response::Response {
+ use shuttle_next::Service;
+
+ let mut router = shuttle_next::Router::new()
+ .route(
+ "/goodbye",
+ shuttle_next::routing::get(get_goodbye).post(post_goodbye)
+ )
+ .route("/hello", shuttle_next::routing::get(hello));
+
+ let response = router.call(request).await.unwrap();
+
+ response
+ }
+ ),
+ ),
+ ];
+
+ for (app, expected) in cases {
+ let actual = quote!(#app);
+ assert_eq!(actual.to_string(), expected.to_string());
+ }
+ }
+
+ #[test]
+ fn parse_endpoint() {
+ let cases = vec![
+ (
+ parse_quote! {
+ #[shuttle_codegen::endpoint(method = get, route = "/hello")]
+ async fn hello() -> &'static str {
+ "Hello, World!"
+ }},
+ Some(Endpoint {
+ route: parse_quote!("/hello"),
+ method: parse_quote!(get),
+ function: parse_quote!(hello),
+ }),
+ 0,
+ ),
+ (
+ parse_quote! {
+ #[doc = r" This attribute is not an endpoint so keep it"]
+ #[shuttle_codegen::endpoint(method = get, route = "/hello")]
+ async fn hello() -> &'static str {
+ "Hello, World!"
+ }},
+ Some(Endpoint {
+ route: parse_quote!("/hello"),
+ method: parse_quote!(get),
+ function: parse_quote!(hello),
+ }),
+ 1,
+ ),
+ (
+ parse_quote! {
+ /// This attribute is not an endpoint so keep it
+ async fn say_hello() -> &'static str {
+ "Hello, World!"
+ }
+ },
+ None,
+ 1,
+ ),
+ ];
+
+ for (mut input, expected, remaining_attributes) in cases {
+ let actual = Endpoint::from_item_fn(&mut input);
+
+ assert_eq!(actual, expected);
+
+ // Verify that only endpoint attributes have been stripped
+ assert_eq!(input.attrs.len(), remaining_attributes);
+ }
+ }
+
+ #[test]
+ fn parse_parameter() {
+ // test method param
+ let cases: Vec<(Parameter, Parameter)> = vec![
+ (
+ // parsing an identifier
+ parse_quote! {
+ method = get
+ },
+ Parameter {
+ key: parse_quote!(method),
+ equals: parse_quote!(=),
+ value: parse_quote!(get),
+ },
+ ),
+ (
+ // parsing a string literal
+ parse_quote! {
+ route = "/hello"
+ },
+ Parameter {
+ key: parse_quote!(route),
+ equals: parse_quote!(=),
+ value: parse_quote!("/hello"),
+ },
+ ),
+ ];
+ for (actual, expected) in cases {
+ assert_eq!(actual, expected);
+ }
+ }
+
+ #[test]
+ fn parse_params() {
+ let actual: Params = parse_quote![(method = get, route = "/hello")];
+
+ let mut expected = Params {
+ params: Default::default(),
+ paren_token: Default::default(),
+ };
+ expected.params.push(parse_quote!(method = get));
+ expected.params.push(parse_quote!(route = "/hello"));
+
+ assert_eq!(actual, expected);
+ }
+
+ #[test]
+ fn parse_app() {
+ let mut input = parse_quote! {
+ #[shuttle_codegen::endpoint(method = get, route = "/hello")]
+ async fn hello() -> &'static str {
+ "Hello, World!"
+ }
+
+ #[shuttle_codegen::endpoint(method = post, route = "/goodbye")]
+ async fn goodbye() -> &'static str {
+ "Goodbye, World!"
+ }
+ };
+
+ let actual = App::from_file(&mut input);
+ let expected = App {
+ endpoints: vec![
+ Endpoint {
+ route: parse_quote!("/hello"),
+ method: parse_quote!(get),
+ function: parse_quote!(hello),
+ },
+ Endpoint {
+ route: parse_quote!("/goodbye"),
+ method: parse_quote!(post),
+ function: parse_quote!(goodbye),
+ },
+ ],
+ };
+
+ assert_eq!(actual, expected);
+ }
+
+ #[test]
+ fn ui() {
+ let t = trybuild::TestCases::new();
+ t.compile_fail("tests/ui/next/*.rs");
+ }
+}
diff --git a/codegen/src/shuttle_main/mod.rs b/codegen/src/shuttle_main/mod.rs
index eb31904de..49d67101f 100644
--- a/codegen/src/shuttle_main/mod.rs
+++ b/codegen/src/shuttle_main/mod.rs
@@ -4,50 +4,32 @@ use quote::{quote, ToTokens};
use syn::{
parenthesized, parse::Parse, parse2, parse_macro_input, parse_quote, punctuated::Punctuated,
spanned::Spanned, token::Paren, Attribute, Expr, ExprLit, FnArg, Ident, ItemFn, Lit, Pat,
- PatIdent, Path, ReturnType, Signature, Stmt, Token, Type,
+ PatIdent, Path, ReturnType, Signature, Stmt, Token, Type, TypePath,
};
pub(crate) fn r#impl(_attr: TokenStream, item: TokenStream) -> TokenStream {
let mut fn_decl = parse_macro_input!(item as ItemFn);
- let wrapper = Wrapper::from_item_fn(&mut fn_decl);
+ let loader = Loader::from_item_fn(&mut fn_decl);
let expanded = quote! {
- #wrapper
-
- fn __binder(
- service: Box,
- addr: std::net::SocketAddr,
- runtime: &shuttle_service::Runtime,
- ) -> shuttle_service::ServeHandle {
- use shuttle_service::Context;
- runtime.spawn(async move { service.bind(addr).await.context("failed to bind service").map_err(Into::into) })
+ #[tokio::main]
+ async fn main() {
+ shuttle_runtime::start(loader).await;
}
- #fn_decl
-
- #[no_mangle]
- pub extern "C" fn _create_service() -> *mut shuttle_service::Bootstrapper {
- let builder: shuttle_service::StateBuilder> =
- |factory, runtime, logger| Box::pin(__shuttle_wrapper(factory, runtime, logger));
+ #loader
- let bootstrapper = shuttle_service::Bootstrapper::new(
- builder,
- __binder,
- shuttle_service::Runtime::new().unwrap(),
- );
-
- let boxed = Box::new(bootstrapper);
- Box::into_raw(boxed)
- }
+ #fn_decl
};
expanded.into()
}
-struct Wrapper {
+struct Loader {
fn_ident: Ident,
fn_inputs: Vec,
+ fn_return: TypePath,
}
#[derive(Debug, PartialEq)]
@@ -55,7 +37,7 @@ struct Input {
/// The identifier for a resource input
ident: Ident,
- /// The shuttle_service builder for this resource
+ /// The shuttle_runtime builder for this resource
builder: Builder,
}
@@ -107,8 +89,18 @@ impl Parse for BuilderOption {
}
}
-impl Wrapper {
- pub(crate) fn from_item_fn(item_fn: &mut ItemFn) -> Self {
+impl Loader {
+ pub(crate) fn from_item_fn(item_fn: &mut ItemFn) -> Option {
+ let fn_ident = item_fn.sig.ident.clone();
+
+ if fn_ident.to_string().as_str() == "main" {
+ emit_error!(
+ fn_ident,
+ "shuttle_runtime::main functions cannot be named `main`"
+ );
+ return None;
+ }
+
let inputs: Vec<_> = item_fn
.sig
.inputs
@@ -135,31 +127,36 @@ impl Wrapper {
})
.collect();
- check_return_type(&item_fn.sig);
-
- Self {
- fn_ident: item_fn.sig.ident.clone(),
+ check_return_type(item_fn.sig.clone()).map(|type_path| Self {
+ fn_ident: fn_ident.clone(),
fn_inputs: inputs,
- }
+ fn_return: type_path,
+ })
}
}
-fn check_return_type(signature: &Signature) {
- match &signature.output {
- ReturnType::Default => emit_error!(
- signature,
- "shuttle_service::main functions need to return a service";
- hint = "See the docs for services with first class support";
- doc = "https://docs.rs/shuttle-service/latest/shuttle_service/attr.main.html#shuttle-supported-services"
- ),
- ReturnType::Type(_, r#type) => match r#type.as_ref() {
- Type::Path(_) => {}
- _ => emit_error!(
- r#type,
- "shuttle_service::main functions need to return a first class service or 'Result";
+fn check_return_type(signature: Signature) -> Option {
+ match signature.output {
+ ReturnType::Default => {
+ emit_error!(
+ signature,
+ "shuttle_runtime::main functions need to return a service";
hint = "See the docs for services with first class support";
- doc = "https://docs.rs/shuttle-service/latest/shuttle_service/attr.main.html#shuttle-supported-services"
- ),
+ doc = "https://docs.rs/shuttle-service/latest/shuttle_runtime/attr.main.html#shuttle-supported-services"
+ );
+ None
+ }
+ ReturnType::Type(_, r#type) => match *r#type {
+ Type::Path(path) => Some(path),
+ _ => {
+ emit_error!(
+ r#type,
+ "shuttle_runtime::main functions need to return a first class service or 'Result";
+ hint = "See the docs for services with first class support";
+ doc = "https://docs.rs/shuttle-service/latest/shuttle_runtime/attr.main.html#shuttle-supported-services"
+ );
+ None
+ }
},
}
}
@@ -186,9 +183,12 @@ fn attribute_to_builder(pat_ident: &PatIdent, attrs: Vec) -> syn::Res
Ok(builder)
}
-impl ToTokens for Wrapper {
+impl ToTokens for Loader {
fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {
let fn_ident = &self.fn_ident;
+
+ let return_type = &self.fn_return;
+
let mut fn_inputs: Vec<_> = Vec::with_capacity(self.fn_inputs.len());
let mut fn_inputs_builder: Vec<_> = Vec::with_capacity(self.fn_inputs.len());
let mut fn_inputs_builder_options: Vec<_> = Vec::with_capacity(self.fn_inputs.len());
@@ -210,7 +210,7 @@ impl ToTokens for Wrapper {
lit: Lit::Str(str), ..
}) => {
needs_vars = true;
- quote!(&shuttle_service::strfmt(#str, &vars)?)
+ quote!(&shuttle_runtime::strfmt(#str, &vars)?)
}
other => quote!(#other),
};
@@ -232,7 +232,7 @@ impl ToTokens for Wrapper {
None
} else {
Some(parse_quote!(
- use shuttle_service::ResourceBuilder;
+ use shuttle_runtime::{Factory, ResourceBuilder};
))
};
@@ -244,68 +244,33 @@ impl ToTokens for Wrapper {
None
};
- let wrapper = quote! {
- async fn __shuttle_wrapper(
- #factory_ident: &mut dyn shuttle_service::Factory,
- runtime: &shuttle_service::Runtime,
- logger: shuttle_service::Logger,
- ) -> Result, shuttle_service::Error> {
- use shuttle_service::Context;
- use shuttle_service::tracing_subscriber::prelude::*;
+ let loader = quote! {
+ async fn loader(
+ mut #factory_ident: shuttle_runtime::ProvisionerFactory,
+ logger: shuttle_runtime::Logger,
+ ) -> #return_type {
+ use shuttle_runtime::Context;
+ use shuttle_runtime::tracing_subscriber::prelude::*;
#extra_imports
- runtime.spawn_blocking(move || {
- let filter_layer =
- shuttle_service::tracing_subscriber::EnvFilter::try_from_default_env()
- .or_else(|_| shuttle_service::tracing_subscriber::EnvFilter::try_new("INFO"))
- .unwrap();
+ let filter_layer =
+ shuttle_runtime::tracing_subscriber::EnvFilter::try_from_default_env()
+ .or_else(|_| shuttle_runtime::tracing_subscriber::EnvFilter::try_new("INFO"))
+ .unwrap();
- shuttle_service::tracing_subscriber::registry()
- .with(filter_layer)
- .with(logger)
- .init(); // this sets the subscriber as the global default and also adds a compatibility layer for capturing `log::Record`s
- })
- .await
- .map_err(|e| {
- if e.is_panic() {
- let mes = e
- .into_panic()
- .downcast_ref::<&str>()
- .map(|x| x.to_string())
- .unwrap_or_else(|| "panicked setting logger".to_string());
-
- shuttle_service::Error::BuildPanic(mes)
- } else {
- shuttle_service::Error::Custom(shuttle_service::error::CustomError::new(e).context("failed to set logger"))
- }
- })?;
+ shuttle_runtime::tracing_subscriber::registry()
+ .with(filter_layer)
+ .with(logger)
+ .init();
#vars
- #(let #fn_inputs = #fn_inputs_builder::new()#fn_inputs_builder_options.build(#factory_ident, runtime).await.context(format!("failed to provision {}", stringify!(#fn_inputs_builder)))?;)*
+ #(let #fn_inputs = #fn_inputs_builder::new()#fn_inputs_builder_options.build(&mut #factory_ident).await.context(format!("failed to provision {}", stringify!(#fn_inputs_builder)))?;)*
- runtime.spawn(async {
- #fn_ident(#(#fn_inputs),*)
- .await
- .map(|ok| Box::new(ok) as Box)
- })
- .await
- .map_err(|e| {
- if e.is_panic() {
- let mes = e
- .into_panic()
- .downcast_ref::<&str>()
- .map(|x| x.to_string())
- .unwrap_or_else(|| "panicked calling main".to_string());
-
- shuttle_service::Error::BuildPanic(mes)
- } else {
- shuttle_service::Error::Custom(shuttle_service::error::CustomError::new(e).context("failed to call main"))
- }
- })?
+ #fn_ident(#(#fn_inputs),*).await
}
};
- wrapper.to_tokens(tokens);
+ loader.to_tokens(tokens);
}
}
@@ -315,7 +280,7 @@ mod tests {
use quote::quote;
use syn::{parse_quote, Ident};
- use super::{Builder, BuilderOptions, Input, Wrapper};
+ use super::{Builder, BuilderOptions, Input, Loader};
#[test]
fn from_with_return() {
@@ -323,7 +288,7 @@ mod tests {
async fn simple() -> ShuttleAxum {}
);
- let actual = Wrapper::from_item_fn(&mut input);
+ let actual = Loader::from_item_fn(&mut input).unwrap();
let expected_ident: Ident = parse_quote!(simple);
assert_eq!(actual.fn_ident, expected_ident);
@@ -332,65 +297,32 @@ mod tests {
#[test]
fn output_with_return() {
- let input = Wrapper {
+ let input = Loader {
fn_ident: parse_quote!(simple),
fn_inputs: Vec::new(),
+ fn_return: parse_quote!(ShuttleSimple),
};
let actual = quote!(#input);
let expected = quote! {
- async fn __shuttle_wrapper(
- _factory: &mut dyn shuttle_service::Factory,
- runtime: &shuttle_service::Runtime,
- logger: shuttle_service::Logger,
- ) -> Result, shuttle_service::Error> {
- use shuttle_service::Context;
- use shuttle_service::tracing_subscriber::prelude::*;
- runtime.spawn_blocking(move || {
- let filter_layer =
- shuttle_service::tracing_subscriber::EnvFilter::try_from_default_env()
- .or_else(|_| shuttle_service::tracing_subscriber::EnvFilter::try_new("INFO"))
- .unwrap();
-
- shuttle_service::tracing_subscriber::registry()
- .with(filter_layer)
- .with(logger)
- .init();
- })
- .await
- .map_err(|e| {
- if e.is_panic() {
- let mes = e
- .into_panic()
- .downcast_ref::<&str>()
- .map(|x| x.to_string())
- .unwrap_or_else(|| "panicked setting logger".to_string());
-
- shuttle_service::Error::BuildPanic(mes)
- } else {
- shuttle_service::Error::Custom(shuttle_service::error::CustomError::new(e).context("failed to set logger"))
- }
- })?;
-
- runtime.spawn(async {
- simple()
- .await
- .map(|ok| Box::new(ok) as Box)
- })
- .await
- .map_err(|e| {
- if e.is_panic() {
- let mes = e
- .into_panic()
- .downcast_ref::<&str>()
- .map(|x| x.to_string())
- .unwrap_or_else(|| "panicked calling main".to_string());
-
- shuttle_service::Error::BuildPanic(mes)
- } else {
- shuttle_service::Error::Custom(shuttle_service::error::CustomError::new(e).context("failed to call main"))
- }
- })?
+ async fn loader(
+ mut _factory: shuttle_runtime::ProvisionerFactory,
+ logger: shuttle_runtime::Logger,
+ ) -> ShuttleSimple {
+ use shuttle_runtime::Context;
+ use shuttle_runtime::tracing_subscriber::prelude::*;
+
+ let filter_layer =
+ shuttle_runtime::tracing_subscriber::EnvFilter::try_from_default_env()
+ .or_else(|_| shuttle_runtime::tracing_subscriber::EnvFilter::try_new("INFO"))
+ .unwrap();
+
+ shuttle_runtime::tracing_subscriber::registry()
+ .with(filter_layer)
+ .with(logger)
+ .init();
+
+ simple().await
}
};
@@ -403,7 +335,7 @@ mod tests {
async fn complex(#[shuttle_shared_db::Postgres] pool: PgPool) -> ShuttleTide {}
);
- let actual = Wrapper::from_item_fn(&mut input);
+ let actual = Loader::from_item_fn(&mut input).unwrap();
let expected_ident: Ident = parse_quote!(complex);
let expected_inputs: Vec = vec![Input {
ident: parse_quote!(pool),
@@ -430,7 +362,7 @@ mod tests {
#[test]
fn output_with_inputs() {
- let input = Wrapper {
+ let input = Loader {
fn_ident: parse_quote!(complex),
fn_inputs: vec![
Input {
@@ -448,67 +380,33 @@ mod tests {
},
},
],
+ fn_return: parse_quote!(ShuttleComplex),
};
let actual = quote!(#input);
let expected = quote! {
- async fn __shuttle_wrapper(
- factory: &mut dyn shuttle_service::Factory,
- runtime: &shuttle_service::Runtime,
- logger: shuttle_service::Logger,
- ) -> Result, shuttle_service::Error> {
- use shuttle_service::Context;
- use shuttle_service::tracing_subscriber::prelude::*;
- use shuttle_service::ResourceBuilder;
-
- runtime.spawn_blocking(move || {
- let filter_layer =
- shuttle_service::tracing_subscriber::EnvFilter::try_from_default_env()
- .or_else(|_| shuttle_service::tracing_subscriber::EnvFilter::try_new("INFO"))
- .unwrap();
-
- shuttle_service::tracing_subscriber::registry()
- .with(filter_layer)
- .with(logger)
- .init();
- })
- .await
- .map_err(|e| {
- if e.is_panic() {
- let mes = e
- .into_panic()
- .downcast_ref::<&str>()
- .map(|x| x.to_string())
- .unwrap_or_else(|| "panicked setting logger".to_string());
-
- shuttle_service::Error::BuildPanic(mes)
- } else {
- shuttle_service::Error::Custom(shuttle_service::error::CustomError::new(e).context("failed to set logger"))
- }
- })?;
-
- let pool = shuttle_shared_db::Postgres::new().build(factory, runtime).await.context(format!("failed to provision {}", stringify!(shuttle_shared_db::Postgres)))?;
- let redis = shuttle_shared_db::Redis::new().build(factory, runtime).await.context(format!("failed to provision {}", stringify!(shuttle_shared_db::Redis)))?;
-
- runtime.spawn(async {
- complex(pool, redis)
- .await
- .map(|ok| Box::new(ok) as Box)
- })
- .await
- .map_err(|e| {
- if e.is_panic() {
- let mes = e
- .into_panic()
- .downcast_ref::<&str>()
- .map(|x| x.to_string())
- .unwrap_or_else(|| "panicked calling main".to_string());
-
- shuttle_service::Error::BuildPanic(mes)
- } else {
- shuttle_service::Error::Custom(shuttle_service::error::CustomError::new(e).context("failed to call main"))
- }
- })?
+ async fn loader(
+ mut factory: shuttle_runtime::ProvisionerFactory,
+ logger: shuttle_runtime::Logger,
+ ) -> ShuttleComplex {
+ use shuttle_runtime::Context;
+ use shuttle_runtime::tracing_subscriber::prelude::*;
+ use shuttle_runtime::{Factory, ResourceBuilder};
+
+ let filter_layer =
+ shuttle_runtime::tracing_subscriber::EnvFilter::try_from_default_env()
+ .or_else(|_| shuttle_runtime::tracing_subscriber::EnvFilter::try_new("INFO"))
+ .unwrap();
+
+ shuttle_runtime::tracing_subscriber::registry()
+ .with(filter_layer)
+ .with(logger)
+ .init();
+
+ let pool = shuttle_shared_db::Postgres::new().build(&mut factory).await.context(format!("failed to provision {}", stringify!(shuttle_shared_db::Postgres)))?;
+ let redis = shuttle_shared_db::Redis::new().build(&mut factory).await.context(format!("failed to provision {}", stringify!(shuttle_shared_db::Redis)))?;
+
+ complex(pool, redis).await
}
};
@@ -550,7 +448,7 @@ mod tests {
}
);
- let actual = Wrapper::from_item_fn(&mut input);
+ let actual = Loader::from_item_fn(&mut input).unwrap();
let expected_ident: Ident = parse_quote!(complex);
let mut expected_inputs: Vec = vec![Input {
ident: parse_quote!(pool),
@@ -577,7 +475,7 @@ mod tests {
#[test]
fn output_with_input_options() {
- let mut input = Wrapper {
+ let mut input = Loader {
fn_ident: parse_quote!(complex),
fn_inputs: vec![Input {
ident: parse_quote!(pool),
@@ -586,6 +484,7 @@ mod tests {
options: Default::default(),
},
}],
+ fn_return: parse_quote!(ShuttleComplex),
};
input.fn_inputs[0]
@@ -601,63 +500,28 @@ mod tests {
let actual = quote!(#input);
let expected = quote! {
- async fn __shuttle_wrapper(
- factory: &mut dyn shuttle_service::Factory,
- runtime: &shuttle_service::Runtime,
- logger: shuttle_service::Logger,
- ) -> Result, shuttle_service::Error> {
- use shuttle_service::Context;
- use shuttle_service::tracing_subscriber::prelude::*;
- use shuttle_service::ResourceBuilder;
-
- runtime.spawn_blocking(move || {
- let filter_layer =
- shuttle_service::tracing_subscriber::EnvFilter::try_from_default_env()
- .or_else(|_| shuttle_service::tracing_subscriber::EnvFilter::try_new("INFO"))
- .unwrap();
-
- shuttle_service::tracing_subscriber::registry()
- .with(filter_layer)
- .with(logger)
- .init();
- })
- .await
- .map_err(|e| {
- if e.is_panic() {
- let mes = e
- .into_panic()
- .downcast_ref::<&str>()
- .map(|x| x.to_string())
- .unwrap_or_else(|| "panicked setting logger".to_string());
-
- shuttle_service::Error::BuildPanic(mes)
- } else {
- shuttle_service::Error::Custom(shuttle_service::error::CustomError::new(e).context("failed to set logger"))
- }
- })?;
+ async fn loader(
+ mut factory: shuttle_runtime::ProvisionerFactory,
+ logger: shuttle_runtime::Logger,
+ ) -> ShuttleComplex {
+ use shuttle_runtime::Context;
+ use shuttle_runtime::tracing_subscriber::prelude::*;
+ use shuttle_runtime::{Factory, ResourceBuilder};
+
+ let filter_layer =
+ shuttle_runtime::tracing_subscriber::EnvFilter::try_from_default_env()
+ .or_else(|_| shuttle_runtime::tracing_subscriber::EnvFilter::try_new("INFO"))
+ .unwrap();
+
+ shuttle_runtime::tracing_subscriber::registry()
+ .with(filter_layer)
+ .with(logger)
+ .init();
let vars = std::collections::HashMap::from_iter(factory.get_secrets().await?.into_iter().map(|(key, value)| (format!("secrets.{}", key), value)));
- let pool = shuttle_shared_db::Postgres::new().size(&shuttle_service::strfmt("10Gb", &vars)?).public(false).build(factory, runtime).await.context(format!("failed to provision {}", stringify!(shuttle_shared_db::Postgres)))?;
+ let pool = shuttle_shared_db::Postgres::new().size(&shuttle_runtime::strfmt("10Gb", &vars)?).public(false).build(&mut factory).await.context(format!("failed to provision {}", stringify!(shuttle_shared_db::Postgres)))?;
- runtime.spawn(async {
- complex(pool)
- .await
- .map(|ok| Box::new(ok) as Box)
- })
- .await
- .map_err(|e| {
- if e.is_panic() {
- let mes = e
- .into_panic()
- .downcast_ref::<&str>()
- .map(|x| x.to_string())
- .unwrap_or_else(|| "panicked calling main".to_string());
-
- shuttle_service::Error::BuildPanic(mes)
- } else {
- shuttle_service::Error::Custom(shuttle_service::error::CustomError::new(e).context("failed to call main"))
- }
- })?
+ complex(pool).await
}
};
@@ -667,6 +531,6 @@ mod tests {
#[test]
fn ui() {
let t = trybuild::TestCases::new();
- t.compile_fail("tests/ui/*.rs");
+ t.compile_fail("tests/ui/main/*.rs");
}
}
diff --git a/codegen/tests/ui/main/duplicate-main-fn.rs b/codegen/tests/ui/main/duplicate-main-fn.rs
new file mode 100644
index 000000000..ed8e38c30
--- /dev/null
+++ b/codegen/tests/ui/main/duplicate-main-fn.rs
@@ -0,0 +1,2 @@
+#[shuttle_codegen::main]
+async fn main() -> ShuttleRocket {}
diff --git a/codegen/tests/ui/main/duplicate-main-fn.stderr b/codegen/tests/ui/main/duplicate-main-fn.stderr
new file mode 100644
index 000000000..4b516b5c8
--- /dev/null
+++ b/codegen/tests/ui/main/duplicate-main-fn.stderr
@@ -0,0 +1,11 @@
+error: shuttle_runtime::main functions cannot be named `main`
+ --> tests/ui/main/duplicate-main-fn.rs:2:10
+ |
+2 | async fn main() -> ShuttleRocket {}
+ | ^^^^
+
+error[E0601]: `main` function not found in crate `$CRATE`
+ --> tests/ui/main/duplicate-main-fn.rs:2:36
+ |
+2 | async fn main() -> ShuttleRocket {}
+ | ^ consider adding a `main` function to `$DIR/tests/ui/main/duplicate-main-fn.rs`
diff --git a/codegen/tests/ui/main/missing-return.stderr b/codegen/tests/ui/main/missing-return.stderr
index e84ed9923..7ec24dffd 100644
--- a/codegen/tests/ui/main/missing-return.stderr
+++ b/codegen/tests/ui/main/missing-return.stderr
@@ -1,7 +1,7 @@
-error: shuttle_service::main functions need to return a service
+error: shuttle_runtime::main functions need to return a service
= help: See the docs for services with first class support
- = note: https://docs.rs/shuttle-service/latest/shuttle_service/attr.main.html#shuttle-supported-services
+ = note: https://docs.rs/shuttle-service/latest/shuttle_runtime/attr.main.html#shuttle-supported-services
--> tests/ui/main/missing-return.rs:2:1
|
diff --git a/codegen/tests/ui/main/return-tuple.stderr b/codegen/tests/ui/main/return-tuple.stderr
index b9fed7820..94da0bcb5 100644
--- a/codegen/tests/ui/main/return-tuple.stderr
+++ b/codegen/tests/ui/main/return-tuple.stderr
@@ -1,7 +1,7 @@
-error: shuttle_service::main functions need to return a first class service or 'Result
+error: shuttle_runtime::main functions need to return a first class service or 'Result
= help: See the docs for services with first class support
- = note: https://docs.rs/shuttle-service/latest/shuttle_service/attr.main.html#shuttle-supported-services
+ = note: https://docs.rs/shuttle-service/latest/shuttle_runtime/attr.main.html#shuttle-supported-services
--> tests/ui/main/return-tuple.rs:2:28
|
diff --git a/codegen/tests/ui/next/duplicate-endpoint-param.rs b/codegen/tests/ui/next/duplicate-endpoint-param.rs
new file mode 100644
index 000000000..7830c9ad3
--- /dev/null
+++ b/codegen/tests/ui/next/duplicate-endpoint-param.rs
@@ -0,0 +1,11 @@
+shuttle_codegen::app! {
+ #[shuttle_codegen::endpoint(method = get, method = get)]
+ async fn hello() -> &'static str {
+ "Hello, World!"
+ }
+
+ #[shuttle_codegen::endpoint(route = "/goodbye", route = "/goodbye")]
+ async fn goodbye() -> &'static str {
+ "Goodbye, World!"
+ }
+}
diff --git a/codegen/tests/ui/next/duplicate-endpoint-param.stderr b/codegen/tests/ui/next/duplicate-endpoint-param.stderr
new file mode 100644
index 000000000..25dd13f7e
--- /dev/null
+++ b/codegen/tests/ui/next/duplicate-endpoint-param.stderr
@@ -0,0 +1,41 @@
+error: duplicate endpoint method
+
+ = help: The endpoint `method` should only be set once.
+
+ --> tests/ui/next/duplicate-endpoint-param.rs:2:47
+ |
+2 | #[shuttle_codegen::endpoint(method = get, method = get)]
+ | ^^^^^^
+
+error: no route provided
+
+ = help: Add a route to your endpoint: `route = "/hello")`
+
+ --> tests/ui/next/duplicate-endpoint-param.rs:2:32
+ |
+2 | #[shuttle_codegen::endpoint(method = get, method = get)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: duplicate endpoint route
+
+ = help: The endpoint `route` should only be set once.
+
+ --> tests/ui/next/duplicate-endpoint-param.rs:7:53
+ |
+7 | #[shuttle_codegen::endpoint(route = "/goodbye", route = "/goodbye")]
+ | ^^^^^
+
+error: no method provided
+
+ = help: Add a method to your endpoint: `method = get`
+
+ --> tests/ui/next/duplicate-endpoint-param.rs:7:32
+ |
+7 | #[shuttle_codegen::endpoint(route = "/goodbye", route = "/goodbye")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0601]: `main` function not found in crate `$CRATE`
+ --> tests/ui/next/duplicate-endpoint-param.rs:11:2
+ |
+11 | }
+ | ^ consider adding a `main` function to `$DIR/tests/ui/next/duplicate-endpoint-param.rs`
diff --git a/codegen/tests/ui/next/duplicate-methods.rs b/codegen/tests/ui/next/duplicate-methods.rs
new file mode 100644
index 000000000..6c33ac070
--- /dev/null
+++ b/codegen/tests/ui/next/duplicate-methods.rs
@@ -0,0 +1,16 @@
+shuttle_codegen::app! {
+ #[shuttle_codegen::endpoint(method = get, route = "/hello")]
+ async fn hello() -> &'static str {
+ "Hello, World!"
+ }
+
+ #[shuttle_codegen::endpoint(method = post, route = "/hello")]
+ async fn goodbye() -> &'static str {
+ "Goodbye, World!"
+ }
+
+ #[shuttle_codegen::endpoint(method = post, route = "/hello")]
+ async fn goodbye() -> &'static str {
+ "Goodbye, World!"
+ }
+}
diff --git a/codegen/tests/ui/next/duplicate-methods.stderr b/codegen/tests/ui/next/duplicate-methods.stderr
new file mode 100644
index 000000000..562a6b32c
--- /dev/null
+++ b/codegen/tests/ui/next/duplicate-methods.stderr
@@ -0,0 +1,14 @@
+error: only one method of each type is allowed per route
+
+ = help: Remove one of the post methods on the "/hello" route.
+
+ --> tests/ui/next/duplicate-methods.rs:12:42
+ |
+12 | #[shuttle_codegen::endpoint(method = post, route = "/hello")]
+ | ^^^^
+
+error[E0601]: `main` function not found in crate `$CRATE`
+ --> tests/ui/next/duplicate-methods.rs:16:2
+ |
+16 | }
+ | ^ consider adding a `main` function to `$DIR/tests/ui/next/duplicate-methods.rs`
diff --git a/codegen/tests/ui/next/extra-endpoint-attributes.rs b/codegen/tests/ui/next/extra-endpoint-attributes.rs
new file mode 100644
index 000000000..bafa5b92b
--- /dev/null
+++ b/codegen/tests/ui/next/extra-endpoint-attributes.rs
@@ -0,0 +1,7 @@
+shuttle_codegen::app! {
+ #[shuttle_codegen::endpoint(method = get, route = "/hello")]
+ #[shuttle_codegen::endpoint(method = post, route = "/hello")]
+ async fn hello() -> &'static str {
+ "Hello, World!"
+ }
+}
diff --git a/codegen/tests/ui/next/extra-endpoint-attributes.stderr b/codegen/tests/ui/next/extra-endpoint-attributes.stderr
new file mode 100644
index 000000000..4bcc17574
--- /dev/null
+++ b/codegen/tests/ui/next/extra-endpoint-attributes.stderr
@@ -0,0 +1,18 @@
+error: extra endpoint attribute
+
+ = help: There should only be one endpoint annotation per handler function.
+
+ --> tests/ui/next/extra-endpoint-attributes.rs:2:5
+ |
+2 | / #[shuttle_codegen::endpoint(method = get, route = "/hello")]
+3 | | #[shuttle_codegen::endpoint(method = post, route = "/hello")]
+4 | | async fn hello() -> &'static str {
+5 | | "Hello, World!"
+6 | | }
+ | |_____^
+
+error[E0601]: `main` function not found in crate `$CRATE`
+ --> tests/ui/next/extra-endpoint-attributes.rs:7:2
+ |
+7 | }
+ | ^ consider adding a `main` function to `$DIR/tests/ui/next/extra-endpoint-attributes.rs`
diff --git a/codegen/tests/ui/next/invalid-endpoint-param.rs b/codegen/tests/ui/next/invalid-endpoint-param.rs
new file mode 100644
index 000000000..e77b39f99
--- /dev/null
+++ b/codegen/tests/ui/next/invalid-endpoint-param.rs
@@ -0,0 +1,6 @@
+shuttle_codegen::app! {
+ #[shuttle_codegen::endpoint(method = get, route = "/goodbye", invalid = bad)]
+ async fn goodbye() -> &'static str {
+ "Goodbye, World!"
+ }
+}
diff --git a/codegen/tests/ui/next/invalid-endpoint-param.stderr b/codegen/tests/ui/next/invalid-endpoint-param.stderr
new file mode 100644
index 000000000..f52aa0858
--- /dev/null
+++ b/codegen/tests/ui/next/invalid-endpoint-param.stderr
@@ -0,0 +1,14 @@
+error: invalid endpoint argument
+
+ = help: Only `method` and `route` are valid endpoint arguments.
+
+ --> tests/ui/next/invalid-endpoint-param.rs:2:67
+ |
+2 | #[shuttle_codegen::endpoint(method = get, route = "/goodbye", invalid = bad)]
+ | ^^^^^^^
+
+error[E0601]: `main` function not found in crate `$CRATE`
+ --> tests/ui/next/invalid-endpoint-param.rs:6:2
+ |
+6 | }
+ | ^ consider adding a `main` function to `$DIR/tests/ui/next/invalid-endpoint-param.rs`
diff --git a/codegen/tests/ui/next/invalid-endpoint-syntax.rs b/codegen/tests/ui/next/invalid-endpoint-syntax.rs
new file mode 100644
index 000000000..9bf7a2d8c
--- /dev/null
+++ b/codegen/tests/ui/next/invalid-endpoint-syntax.rs
@@ -0,0 +1,11 @@
+shuttle_codegen::app! {
+ #[shuttle_codegen::endpoint(method = get, route = "/hello" extra = abundant)]
+ async fn hello() -> &'static str {
+ "Hello, World!"
+ }
+
+ #[shuttle_codegen::endpoint(method = get, route = "/goodbye", invalid)]
+ async fn goodbye() -> &'static str {
+ "Goodbye, World!"
+ }
+}
diff --git a/codegen/tests/ui/next/invalid-endpoint-syntax.stderr b/codegen/tests/ui/next/invalid-endpoint-syntax.stderr
new file mode 100644
index 000000000..b1fad595a
--- /dev/null
+++ b/codegen/tests/ui/next/invalid-endpoint-syntax.stderr
@@ -0,0 +1,17 @@
+error: expected `,`
+ --> tests/ui/next/invalid-endpoint-syntax.rs:2:64
+ |
+2 | #[shuttle_codegen::endpoint(method = get, route = "/hello" extra = abundant)]
+ | ^^^^^
+
+error: expected `=`
+ --> tests/ui/next/invalid-endpoint-syntax.rs:7:74
+ |
+7 | #[shuttle_codegen::endpoint(method = get, route = "/goodbye", invalid)]
+ | ^
+
+error[E0601]: `main` function not found in crate `$CRATE`
+ --> tests/ui/next/invalid-endpoint-syntax.rs:11:2
+ |
+11 | }
+ | ^ consider adding a `main` function to `$DIR/tests/ui/next/invalid-endpoint-syntax.rs`
diff --git a/codegen/tests/ui/next/invalid-method.rs b/codegen/tests/ui/next/invalid-method.rs
new file mode 100644
index 000000000..73f29bb87
--- /dev/null
+++ b/codegen/tests/ui/next/invalid-method.rs
@@ -0,0 +1,11 @@
+shuttle_codegen::app! {
+ #[shuttle_codegen::endpoint(method = pet, route = "/hello")]
+ async fn hello() -> &'static str {
+ "Hello, World!"
+ }
+
+ #[shuttle_codegen::endpoint(method =, route = "/hello")]
+ async fn hello() -> &'static str {
+ "Hello, World!"
+ }
+}
diff --git a/codegen/tests/ui/next/invalid-method.stderr b/codegen/tests/ui/next/invalid-method.stderr
new file mode 100644
index 000000000..fcd7acacc
--- /dev/null
+++ b/codegen/tests/ui/next/invalid-method.stderr
@@ -0,0 +1,29 @@
+error: method is not supported
+
+ = help: Try one of the following: `get`, `post`, `delete`, `put`, `options`, `head`, `trace` or `patch`
+
+ --> tests/ui/next/invalid-method.rs:2:42
+ |
+2 | #[shuttle_codegen::endpoint(method = pet, route = "/hello")]
+ | ^^^
+
+error: no method provided
+
+ = help: Add a method to your endpoint: `method = get`
+
+ --> tests/ui/next/invalid-method.rs:2:32
+ |
+2 | #[shuttle_codegen::endpoint(method = pet, route = "/hello")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: expected expression
+ --> tests/ui/next/invalid-method.rs:7:41
+ |
+7 | #[shuttle_codegen::endpoint(method =, route = "/hello")]
+ | ^
+
+error[E0601]: `main` function not found in crate `$CRATE`
+ --> tests/ui/next/invalid-method.rs:11:2
+ |
+11 | }
+ | ^ consider adding a `main` function to `$DIR/tests/ui/next/invalid-method.rs`
diff --git a/codegen/tests/ui/next/missing-endpoint-param.rs b/codegen/tests/ui/next/missing-endpoint-param.rs
new file mode 100644
index 000000000..a4fa91bf4
--- /dev/null
+++ b/codegen/tests/ui/next/missing-endpoint-param.rs
@@ -0,0 +1,16 @@
+shuttle_codegen::app! {
+ #[shuttle_codegen::endpoint(method = get)]
+ async fn only_method_param() -> &'static str {
+ "Hello, World!"
+ }
+
+ #[shuttle_codegen::endpoint(route = "/goodbye")]
+ async fn only_route_param() -> &'static str {
+ "Goodbye, World!"
+ }
+
+ #[shuttle_codegen::endpoint()]
+ async fn no_params() -> &'static str {
+ "Goodbye, World!"
+ }
+}
diff --git a/codegen/tests/ui/next/missing-endpoint-param.stderr b/codegen/tests/ui/next/missing-endpoint-param.stderr
new file mode 100644
index 000000000..99150e32f
--- /dev/null
+++ b/codegen/tests/ui/next/missing-endpoint-param.stderr
@@ -0,0 +1,32 @@
+error: no route provided
+
+ = help: Add a route to your endpoint: `route = "/hello")`
+
+ --> tests/ui/next/missing-endpoint-param.rs:2:32
+ |
+2 | #[shuttle_codegen::endpoint(method = get)]
+ | ^^^^^^^^^^^^^^
+
+error: no method provided
+
+ = help: Add a method to your endpoint: `method = get`
+
+ --> tests/ui/next/missing-endpoint-param.rs:7:32
+ |
+7 | #[shuttle_codegen::endpoint(route = "/goodbye")]
+ | ^^^^^^^^^^^^^^^^^^^^
+
+error: missing endpoint arguments
+
+ = help: The endpoint takes two arguments: `endpoint(method = get, route = "/hello")`
+
+ --> tests/ui/next/missing-endpoint-param.rs:12:32
+ |
+12 | #[shuttle_codegen::endpoint()]
+ | ^^
+
+error[E0601]: `main` function not found in crate `$CRATE`
+ --> tests/ui/next/missing-endpoint-param.rs:16:2
+ |
+16 | }
+ | ^ consider adding a `main` function to `$DIR/tests/ui/next/missing-endpoint-param.rs`
diff --git a/common/Cargo.toml b/common/Cargo.toml
index b197ddb0f..6ed9b21c4 100644
--- a/common/Cargo.toml
+++ b/common/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "shuttle-common"
-version = "0.11.2"
+version = "0.12.0"
edition.workspace = true
license.workspace = true
repository.workspace = true
@@ -12,45 +12,53 @@ anyhow = { workspace = true, optional = true }
async-trait = { workspace = true , optional = true }
axum = { workspace = true, optional = true }
bytes = { version = "1.3.0", optional = true }
-chrono = { workspace = true, features = ["serde"] }
+chrono = { workspace = true }
comfy-table = { version = "6.1.3", optional = true }
crossterm = { version = "0.25.0", optional = true }
-headers = { workspace = true }
+headers = { workspace = true, optional = true }
http = { workspace = true, optional = true }
http-body = { version = "0.4.5", optional = true }
+http-serde = { version = "1.1.2", optional = true }
hyper = { workspace = true, optional = true }
jsonwebtoken = { workspace = true, optional = true }
-once_cell = { workspace = true }
+once_cell = { workspace = true, optional = true }
opentelemetry = { workspace = true, optional = true }
opentelemetry-http = { workspace = true, optional = true }
opentelemetry-otlp = { version = "0.11.0", optional = true }
-pin-project = { workspace = true }
+pin-project = { workspace = true, optional = true }
+prost-types = { workspace = true, optional = true }
reqwest = { version = "0.11.13", optional = true }
-rustrict = "0.5.5"
-serde = { workspace = true, features = ["derive"] }
-serde_json = { workspace = true, optional = true }
-strum = { workspace = true }
+rmp-serde = { version = "1.1.1", optional = true }
+rustrict = { version = "0.5.5", optional = true }
+serde = { workspace = true, features = ["derive", "std"] }
+serde_json = { workspace = true }
+strum = { workspace = true, features = ["derive"] }
thiserror = { workspace = true, optional = true }
tonic = { version = "0.8.3", optional = true }
tower = { workspace = true, optional = true }
tower-http = { workspace = true, optional = true }
-tracing = { workspace = true }
+tracing = { workspace = true, features = ["std"] }
tracing-opentelemetry = { workspace = true, optional = true }
tracing-subscriber = { workspace = true, optional = true }
ttl_cache = { workspace = true, optional = true }
-uuid = { workspace = true, features = ["v4", "serde"] }
+uuid = { workspace = true, features = ["v4", "serde"], optional = true }
[features]
-backend = ["async-trait", "axum", "bytes", "http", "http-body", "hyper/client", "jsonwebtoken", "opentelemetry", "opentelemetry-http", "opentelemetry-otlp", "thiserror", "tower", "tower-http", "tracing-opentelemetry", "tracing-subscriber/env-filter", "ttl_cache"]
-display = ["comfy-table", "crossterm"]
-models = ["anyhow", "async-trait", "display", "http", "reqwest", "serde_json"]
+backend = ["async-trait", "axum/matched-path", "claims", "hyper/client", "opentelemetry-otlp", "thiserror", "tower-http", "tracing-subscriber/env-filter", "tracing-subscriber/fmt", "ttl_cache"]
+claims = ["bytes", "chrono/clock", "headers", "http", "http-body", "jsonwebtoken", "opentelemetry", "opentelemetry-http", "pin-project", "tower", "tracing", "tracing-opentelemetry"]
+display = ["chrono/clock", "comfy-table", "crossterm"]
+error = ["prost-types", "thiserror", "uuid"]
+models = ["anyhow", "async-trait", "display", "http", "reqwest", "service"]
+service = ["chrono/serde", "once_cell", "rustrict", "serde/derive", "uuid"]
+tracing = []
+wasm = ["chrono/clock", "http-serde", "http", "rmp-serde", "tracing", "tracing-subscriber"]
[dev-dependencies]
axum = { workspace = true }
base64 = "0.13.1"
+cap-std = "1.0.2"
hyper = { workspace = true }
ring = { workspace = true }
-serde_json = { workspace = true }
tokio = { version = "1.22.0", features = ["macros", "rt-multi-thread"] }
tower = { workspace = true, features = ["util"] }
tracing-fluent-assertions = "0.3.0"
diff --git a/common/src/backends/auth.rs b/common/src/backends/auth.rs
index f36029211..f87bd3fed 100644
--- a/common/src/backends/auth.rs
+++ b/common/src/backends/auth.rs
@@ -1,13 +1,11 @@
-use std::{convert::Infallible, future::Future, ops::Add, pin::Pin, sync::Arc};
+use std::{convert::Infallible, future::Future, pin::Pin, sync::Arc};
use async_trait::async_trait;
use bytes::Bytes;
-use chrono::{Duration, Utc};
use headers::{authorization::Bearer, Authorization, HeaderMapExt};
use http::{Request, Response, StatusCode, Uri};
use http_body::combinators::UnsyncBoxBody;
use hyper::{body, Body, Client};
-use jsonwebtoken::{decode, encode, DecodingKey, EncodingKey, Header as JwtHeader, Validation};
use opentelemetry::global;
use opentelemetry_http::HeaderInjector;
use serde::{Deserialize, Serialize};
@@ -16,14 +14,14 @@ use tower::{Layer, Service};
use tracing::{error, trace, Span};
use tracing_opentelemetry::OpenTelemetrySpanExt;
+use crate::claims::{Claim, Scope};
+
use super::{
cache::{CacheManagement, CacheManager},
- future::{ResponseFuture, StatusCodeFuture},
+ future::StatusCodeFuture,
headers::XShuttleAdminSecret,
};
-pub const EXP_MINUTES: i64 = 5;
-const ISS: &str = "shuttle";
const PUBLIC_KEY_CACHE_KEY: &str = "shuttle.public-key";
/// Layer to check the admin secret set by deployer is correct
@@ -86,165 +84,13 @@ where
}
}
-/// The scope of operations that can be performed on shuttle
-/// Every scope defaults to read and will use a suffix for updating tasks
-#[derive(Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
-#[serde(rename_all = "snake_case")]
-pub enum Scope {
- /// Read the details, such as status and address, of a deployment
- Deployment,
-
- /// Push a new deployment
- DeploymentPush,
-
- /// Read the logs of a deployment
- Logs,
-
- /// Read the details of a service
- Service,
-
- /// Create a new service
- ServiceCreate,
-
- /// Read the status of a project
- Project,
-
- /// Create a new project
- ProjectCreate,
-
- /// Get the resources for a project
- Resources,
-
- /// Provision new resources for a project or update existing ones
- ResourcesWrite,
-
- /// List the secrets of a project
- Secret,
-
- /// Add or update secrets of a project
- SecretWrite,
-
- /// Get list of users
- User,
-
- /// Add or update users
- UserCreate,
-
- /// Create an ACME account
- AcmeCreate,
-
- /// Create a custom domain,
- CustomDomainCreate,
-
- /// Admin level scope to internals
- Admin,
-}
-
#[derive(Deserialize, Serialize)]
/// Response used internally to pass around JWT token
pub struct ConvertResponse {
pub token: String,
}
-#[derive(Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
-pub struct Claim {
- /// Expiration time (as UTC timestamp).
- pub exp: usize,
- /// Issued at (as UTC timestamp).
- iat: usize,
- /// Issuer.
- iss: String,
- /// Not Before (as UTC timestamp).
- nbf: usize,
- /// Subject (whom token refers to).
- pub sub: String,
- /// Scopes this token can access
- pub scopes: Vec,
- /// The original token that was parsed
- token: Option,
-}
-
-impl Claim {
- /// Create a new claim for a user with the given scopes
- pub fn new(sub: String, scopes: Vec) -> Self {
- let iat = Utc::now();
- let exp = iat.add(Duration::minutes(EXP_MINUTES));
-
- Self {
- exp: exp.timestamp() as usize,
- iat: iat.timestamp() as usize,
- iss: ISS.to_string(),
- nbf: iat.timestamp() as usize,
- sub,
- scopes,
- token: None,
- }
- }
-
- pub fn into_token(self, encoding_key: &EncodingKey) -> Result {
- if let Some(token) = self.token {
- Ok(token)
- } else {
- encode(
- &JwtHeader::new(jsonwebtoken::Algorithm::EdDSA),
- &self,
- encoding_key,
- )
- .map_err(|err| {
- error!(
- error = &err as &dyn std::error::Error,
- "failed to convert claim to token"
- );
- match err.kind() {
- jsonwebtoken::errors::ErrorKind::Json(_) => StatusCode::INTERNAL_SERVER_ERROR,
- jsonwebtoken::errors::ErrorKind::Crypto(_) => StatusCode::SERVICE_UNAVAILABLE,
- _ => StatusCode::INTERNAL_SERVER_ERROR,
- }
- })
- }
- }
-
- pub fn from_token(token: &str, public_key: &[u8]) -> Result {
- let decoding_key = DecodingKey::from_ed_der(public_key);
- let mut validation = Validation::new(jsonwebtoken::Algorithm::EdDSA);
- validation.set_issuer(&[ISS]);
-
- trace!(token, "converting token to claim");
- let mut claim: Self = decode(token, &decoding_key, &validation)
- .map_err(|err| {
- error!(
- error = &err as &dyn std::error::Error,
- "failed to convert token to claim"
- );
- match err.kind() {
- jsonwebtoken::errors::ErrorKind::InvalidSignature
- | jsonwebtoken::errors::ErrorKind::InvalidAlgorithmName
- | jsonwebtoken::errors::ErrorKind::ExpiredSignature
- | jsonwebtoken::errors::ErrorKind::InvalidIssuer
- | jsonwebtoken::errors::ErrorKind::ImmatureSignature => {
- StatusCode::UNAUTHORIZED
- }
- jsonwebtoken::errors::ErrorKind::InvalidToken
- | jsonwebtoken::errors::ErrorKind::InvalidAlgorithm
- | jsonwebtoken::errors::ErrorKind::Base64(_)
- | jsonwebtoken::errors::ErrorKind::Json(_)
- | jsonwebtoken::errors::ErrorKind::Utf8(_) => StatusCode::BAD_REQUEST,
- jsonwebtoken::errors::ErrorKind::MissingAlgorithm => {
- StatusCode::INTERNAL_SERVER_ERROR
- }
- jsonwebtoken::errors::ErrorKind::Crypto(_) => StatusCode::SERVICE_UNAVAILABLE,
- _ => StatusCode::INTERNAL_SERVER_ERROR,
- }
- })?
- .claims;
-
- claim.token = Some(token.to_string());
-
- Ok(claim)
- }
-}
-
-/// Trait to get a public key asyncronously
+/// Trait to get a public key asynchronously
#[async_trait]
pub trait PublicKeyFn: Send + Sync + Clone {
type Error: std::error::Error + Send;
@@ -439,53 +285,6 @@ where
}
}
-/// This layer takes a claim on a request extension and uses it's internal token to set the Authorization Bearer
-#[derive(Clone)]
-pub struct ClaimLayer;
-
-impl Layer for ClaimLayer {
- type Service = ClaimService;
-
- fn layer(&self, inner: S) -> Self::Service {
- ClaimService { inner }
- }
-}
-
-#[derive(Clone)]
-pub struct ClaimService {
- inner: S,
-}
-
-impl Service>> for ClaimService
-where
- S: Service>> + Send + 'static,
- S::Future: Send + 'static,
-{
- type Response = S::Response;
- type Error = S::Error;
- type Future = ResponseFuture;
-
- fn poll_ready(
- &mut self,
- cx: &mut std::task::Context<'_>,
- ) -> std::task::Poll> {
- self.inner.poll_ready(cx)
- }
-
- fn call(&mut self, mut req: Request>) -> Self::Future {
- if let Some(claim) = req.extensions().get::() {
- if let Some(token) = claim.token.clone() {
- req.headers_mut()
- .typed_insert(Authorization::bearer(&token).expect("to set JWT token"));
- }
- }
-
- let future = self.inner.call(req);
-
- ResponseFuture(future)
- }
-}
-
/// Check that the required scopes are set on the [Claim] extension on a [Request]
#[derive(Clone)]
pub struct ScopedLayer {
@@ -568,7 +367,9 @@ mod tests {
use serde_json::json;
use tower::{ServiceBuilder, ServiceExt};
- use super::{Claim, JwtAuthenticationLayer, Scope, ScopedLayer};
+ use crate::claims::{Claim, Scope};
+
+ use super::{JwtAuthenticationLayer, ScopedLayer};
#[test]
fn to_token_and_back() {
diff --git a/common/src/backends/future.rs b/common/src/backends/future.rs
index 5603fdaa0..e50bd41d4 100644
--- a/common/src/backends/future.rs
+++ b/common/src/backends/future.rs
@@ -8,23 +8,6 @@ use axum::response::Response;
use http::StatusCode;
use pin_project::pin_project;
-// Future for layers that just return the inner response
-#[pin_project]
-pub struct ResponseFuture(#[pin] pub F);
-
-impl Future for ResponseFuture
-where
- F: Future