Open apps4uco opened 2 years ago
@psiace
I suggest you use the tokio runtime instead of async-std
I suggest you use the tokio runtime instead of async-std
That is what I am trying to do but get a compilation error because in the sea_orm_casbin_adapter crates Cargo.toml it specifies async-std as the runtime for casbin.
Would it be possible to have features to configure the desired runtime in this projects Cargo.toml.
@PsiACE @lingdu1234
just updated the version 3.0.1 you can try it ,may be works,in the version 3.0 enabled no default run time,the adapter'run time same with the sea-orm
[dependencies]
sea_orm_casbin_adapter = {version = "0.3", features = ["mysql", "runtime-tokio-native-tls"]}
sea-orm = {version = "0.6.0", default-features = false, features = ["sqlx-mysql", "macros", "runtime-tokio-native-tls"]}
or
[dependencies]
sea_orm_casbin_adapter = {version = "0.3", features = ["mysql", "runtime-tokio-rustls"]}
[dependencies.sea-orm]
default-features = false
features = ["macros", "runtime-tokio-rustls"]
version = "0.6.0"
[features]
default = ["postgres", "mysql"]
mysql = ["sea-orm/sqlx-mysql"]
postgres = ["sea-orm/sqlx-postgres"]
sqlite = ["sea-orm/sqlx-sqlite"]
@apps4uco @hsluoyz
Hi, In Cargo.toml "runtime-async-std" is enabled for casbin and "runtime-tokio-native-tls" for sea-orm is this a mistake?
As I understand it should be one or the other.
Also would it be possible to choose the runtime, I previously used tokio with rust-tls in my project and was forced to change it to "runtime-tokio-native-tls" by the inclusion of this crate.
As both (incompatible?) features are enabled I get a compile error in casbin-2.0.9/src/adapter/file_adapter.rs:20:10
Thanks