Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
From what I could turn up when googling the specific error lines (here), it has something to do with the crate mio not having support for WASM, but I don’t understand what’s being said on this thread.
So, to solve your problem, you need to have sqlx be optional (and tokio as well), and enable these crates when the "ssr" feature is enabled. Finally, all references to these crates in your code need to be gated with cfg_if and/or #cfg(feature="ssr"). Since you're using sqlx (and probably tokio), I recommend looking at this example that uses sqlite and axum.