https://linen.dev logo
Rust version issue
# help
a
Hi, I tried creating an axum project. I edited the
Cargo.toml
to use
axum = 0.6.9
due to the
tokio
issue mentioned in one of the help posts. My `Cargo.toml`:
Copy code
[package]
name = "jon-gjengset-qa"
version = "0.1.0"
edition = "2021"
publish = false

[lib]

[dependencies]
shuttle-service = { version = "0.11.0", features = ["web-axum"] }
axum = "0.6.9"
sync_wrapper = "0.1.2"
Using
cargo shuttle run
, I get the error:
Copy code
error: couldn't read \\?\C:\Users\shouv\OneDrive\Desktop\Programming\projects\jon-gjengset-qa\target\debug\build\rustversion-d71d0b70b5b475aa\out/version.expr: The filename, directory name, or volume label syntax is incorrect. (os error 123)
   --> C:\Users\shouv\.cargo\registry\src\github.com-1ecc6299db9ec823\rustversion-1.0.12\src\lib.rs:186:30
    |
186 | const RUSTVERSION: Version = include!(concat!(env!("OUT_DIR"), "/version.expr"));
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)


error: aborting due to previous error


error: could not compile `rustversion` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
Error: 1 job failed
a
Hey there, are you running windows?
r
Given the output I’d say yes, although it does look like WSL
a
yeah
normally using
cargo +1.65 shuttle run
fixes this in WSL (although at least for me, it took an abnormally long time to launch which prompted me to switch over to Linux) If you aren't on 1.65 or above already I'd try upgrading your local Rust version. If you are, the above command fixes most issues but feel free to report back if it doesn't
r
It’s also an “older” version of Shuttle (0.11.0)
But yeah, that’s likely an old Rust version as well
k
Yeah, on windows in addition to the above you also likely need to do a
cargo shuttle build
before
cargo shuttle run
.
a
I was on 1.67 and updated to 1.68. The issue still persists. I'm on Windows (not WSL). I tried
cargo shuttle build
, but it says that there is no such command.
k
Oh, sorry! It's just
cargo build
🤦
a
Issue persists after
cargo build
.
k
Oh, that's odd, it usually fixes it 🤔
a
I think I had this issue before but didn't create a github issue for it so it never got tracked It's fixed by just trying to run in WSL but it is a bit of a hassle (you need WSL to install Docker for local shuttle provisioned db runs anyway but... yea)
a
I'll try WSL