+
Skip to content

Conversation

bamidev
Copy link
Contributor

@bamidev bamidev commented Mar 24, 2024

When you add sea-orm simply like this:
sea-orm = { version = "0.12.15", features = ["runtime-tokio", "sqlx-sqlite"] }
It will complain about no runtime being selected:

thread 'main' panicked at /home/bamilab/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-core-0.7.4/src/pool/inner.rs:52:24:
either the `runtime-async-std` or `runtime-tokio` feature must be enabled

Even though I use the "runtime-tokio" feature.
It seems like it isn't being passed down to the sqlx crate.

For the moment I use the workaround of adding this to my Cargo.toml:
sqlx = { features = ["runtime-tokio"] }
But it is just a workaround.

@tyt2y3
Copy link
Member

tyt2y3 commented Mar 24, 2024

You're right. The original design is that you have to specify a runtime+tls feature flag , e.g. runtime-tokio-native-tls.
The runtime-tokio is transitive, and is simply used to signify that tokio has been enabled in sea-orm.

@tyt2y3 tyt2y3 mentioned this pull request Mar 27, 2024
2 tasks
@tyt2y3 tyt2y3 merged commit e34f09d into SeaQL:master Mar 29, 2024
Copy link

github-actions bot commented Aug 4, 2024

🎉 Released In 1.0.0 🎉

Thank you everyone for the contribution!
This feature is now available in the latest release. Now is a good time to upgrade!
Your participation is what makes us unique; your adoption is what drives us forward.
You can support SeaQL 🌊 by starring our repos, sharing our libraries and becoming a sponsor ⭐.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载