From 735fcd1b498710995ee5dc5f4b31201e5b44704d Mon Sep 17 00:00:00 2001 From: asonix Date: Sun, 24 Sep 2023 15:52:31 -0500 Subject: [PATCH] Remove dependency on actix-web-codegen --- Cargo.lock | 14 -------------- Cargo.toml | 2 +- src/main.rs | 15 ++++++++------- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e567df0..e657ab7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -175,13 +175,11 @@ checksum = "0e4a5b5e29603ca8c94a77c65cf874718ceb60292c5a5c3e5f4ace041af462b9" dependencies = [ "actix-codec", "actix-http", - "actix-macros", "actix-router", "actix-rt", "actix-server", "actix-service", "actix-utils", - "actix-web-codegen", "ahash 0.8.3", "bytes", "bytestring", @@ -206,18 +204,6 @@ dependencies = [ "url", ] -[[package]] -name = "actix-web-codegen" -version = "4.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5" -dependencies = [ - "actix-router", - "proc-macro2", - "quote", - "syn 2.0.31", -] - [[package]] name = "addr2line" version = "0.21.0" diff --git a/Cargo.toml b/Cargo.toml index fcc3f4b..b246e2f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ io-uring = ["dep:tokio-uring", "sled/io_uring", "actix-web/experimental-io-uring [dependencies] actix-form-data = "0.7.0-beta.4" -actix-web = { version = "4.0.0", default-features = false, features = ["macros"] } +actix-web = { version = "4.0.0", default-features = false } anyhow = "1.0" async-trait = "0.1.51" barrel = { version = "0.7.0", features = ["pg"] } diff --git a/src/main.rs b/src/main.rs index af565d2..0c40c24 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,9 @@ -#[actix_web::main] -async fn main() -> color_eyre::Result<()> { - pict_rs::PictRsConfiguration::build_default()? - .install_tracing()? - .install_metrics()? - .run() - .await +fn main() -> color_eyre::Result<()> { + actix_web::rt::System::new().block_on(async move { + pict_rs::PictRsConfiguration::build_default()? + .install_tracing()? + .install_metrics()? + .run() + .await + }) }