shuttle-hq / shuttle-examples

Examples for using Shuttle with different frameworks and resources
https://www.shuttle.rs
143 stars 60 forks source link

Axum turbo example not working #184

Closed francisstephan closed 1 month ago

francisstephan commented 1 month ago
When I try to run the Axum Turso example, I get the error: error[E0277]: the trait bound TursoOutput: IntoResource<libsql::Database> is not satisfied 15 #[shuttle_runtime::main] ^^^^^^^^^^^^^^^^^^^^^^^^ the trait IntoResource<libsql::Database> is not implemented for TursoOutput

= help: the trait IntoResource<libsql::database::Database> is implemented for TursoOutput = help: for that trait implementation, expected libsql::database::Database, found libsql::Database = note: this error originates in the attribute macro shuttle_runtime::main (in Nightly builds, run with -Z macro-backtrace for more info)

However, I used libsql 0.5.0; When I switch back to libsql version 0.3.1 as in your example, it works, so this is definitely a Turso libsql issue

jonaro00 commented 1 month ago

For me it works:

$ cd axum/turso # on main branch
$ cargo shuttle run
# ...build...
    Starting turso-example on http://127.0.0.1:8000
2024-08-19T18:10:30.133+02:00 [Runtime] Starting on 127.0.0.1:8000

Are you sure you are running it without modifying the libsql version (0.3.1)? (I see that libsql 0.5.0 is out. A PR for updating it is welcome.)

francisstephan commented 1 month ago

I confirm that it works with libsql 0.3.1, but not with libsql 0.5.0 as I had initially tried

jonaro00 commented 1 month ago

Great! If you want to contribute an upgrade to 0.5, you can look for shuttle-turso in the main shuttle repo.