I attempted to update to actix_rt 2.0.2 and have since been getting the following error:
thread 'main' panicked at 'System is not running'
Here is my minimal example:
# Cargo.toml
[dependencies]
actix = "0.10"
actix-web = { version = "3.3.2", default-features = false }
actix-rt = "2.0.2"
//! main.rs
use actix_rt;
use actix_web::{HttpServer, App, HttpResponse};
async fn hello() -> HttpResponse {
HttpResponse::Ok().finish()
}
#[actix_rt::main]
async fn main() -> std::io::Result<()> {
let server = HttpServer::new(move || {
App::new().route("/", actix_web::web::get().to(hello))
});
server.bind("127.0.0.1:8080")?.run().await
}
I'm assuming it must be some version incompatibilities between the actix crates. I need actix_rt 2.0.x so that I can integrate with Criterion.
Is there a combination of version numbers to get these to work together?
You have incompatible versions of actix crates. You can either downgrade actix-rt
to 1
, or upgrade to beta versions like:
actix = "0.11.0-beta.2"
actix-web = "4.0.0-beta.3"
actix-rt = "2.0.2"
Use these dependencies in your cargo.toml file:
actix = "0.11.0"
actix-web = "3.3.2"
actix-rt = "1.1.1"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With