actixweb which requires an async main with #[actix_web::main] macro, but also want to use tokio_postgres which requires #[tokio::main].
Given that actixweb uses tokio, I thought it shouldn't matter which I put in the main function, but problem is errors are thrown if you pick either on the other. EG: if a pick actix_web::main, all tokio_postgres async calls fail. and if I choose tokio_main actix_web complains of not having detected a system running.
I think you can use tokio runtime for artix
How? actixweb refuses to run when I put #[tokio::main]
Обсуждают сегодня