Closed mjm918 closed 1 year ago
Sounds like you haven't selected an async runtime yet. Welds is built as a wrapper around sqlx and sqlx really wants you to specify exactly what async runtime to use.
I think you just need to add a couple more dependencies to your Cargo.toml file
something like this if you want to use async-std
async-std = { version = "1", features = ["attributes"] }
sqlx = { version = "0.6", features = [ "runtime-async-std-rustls", "macros"] }
welds = { version = '0.1', features=["sqlite", "detect", "check"] }
or like this if you like tokio
tokio = { version = "1", features = ["rt", "macros"]}
welds = { version = '0.1', features = ["sqlite", 'detect', 'check'] }
sqlx = { version = "0.6", features = [ 'runtime-tokio-rustls', "macros"] }
of course you will want to enable the feature for the DB type you want to use (sqlite, postgres, mysql, mssql)
I missed the runtime feature in sqlx. thanks for the help ☺️
After adding the lib using cargo, i'm getting the following error: