https://linen.dev logo
Shuttle 0.12.0; rocket; run failure "Build error: ...
# help
m
Hi, After updating my project to shuttle 0.12.0 I get an error when running
cargo shuttle run
. It says:
Copy code
Error: Your Shuttle project must be a binary.
It works with the hello world from
cargo shuttle --rocket init
I did update the Cargo.toml by copy/pasting from the hello world, so I don't think that is the issue. In case it helps, here is my Cargo.toml:
Copy code
[package]
name = "lilyplayer"
version = "0.1.0"
edition = "2021"
publish = false

[lib]

[dependencies]
shuttle-runtime = "0.12.0"
rocket = "0.5.0-rc.2"
shuttle-rocket = "0.12.0"
tokio = "1.26.0"
ureq = "2.4.0"
lazy_static = "1.4.0"
Any idea what can cause this error?
a
remove the
[lib]
bit
m
did that already, didn't have any impact
a
hmmmm
is your main file a lib.rs?
m
it is. Seems that was the issue.
a
does it have the
shuttle_runtime::main
macro over the main function?
m
renaming to main.rs like the hello world makes it build
let me check. I didn't change the code when moving from 0.11.0 to 0.12.0
a
ah that might be why then - v0.11.0 to v0.12.0 makes a lot of changes in terms of the runtime and there are some changes required
m
that's it indeed. I just updated the code and now
cargo shuttle run
works
problem solved. Many thanks for such a quick fix.
a
no problem, happy to help
2 Views