shuttle-examples icon indicating copy to clipboard operation
shuttle-examples copied to clipboard

Axum turbo example not working

Open francisstephan opened this issue 1 year ago • 1 comments

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

francisstephan avatar Aug 19 '24 15:08 francisstephan

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.)

jonaro00 avatar Aug 19 '24 16:08 jonaro00

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

francisstephan avatar Aug 21 '24 14:08 francisstephan

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

jonaro00 avatar Aug 21 '24 17:08 jonaro00