R
Railway13mo ago
Shah

Rust binary not found after build

I'm trying to run my binary, I have cargo build --release as the build step, and startCommand = "./target/release/bouncer" in my railway.toml. However in the deploy step it just says ./target/release/bouncer: No such file or directory
Solution:
have you tried letting nixpacks build it without specifying any build or start commands yourself?
Jump to solution
12 Replies
Percy
Percy13mo ago
Project ID: 030df044-ed0b-4754-bc9f-8e747b17ff07
Shah
Shah13mo ago
Am I missing something here?
Solution
Brody
Brody13mo ago
have you tried letting nixpacks build it without specifying any build or start commands yourself?
Shah
Shah13mo ago
Yeah it tries to run ./bin/bouncer and gives the same error Well, I haven't tried without a build command, let me try that Wow that was it, it works Thanks!
Brody
Brody13mo ago
can i ask why you thought you needed to set your own build and start commands?
Shah
Shah13mo ago
The docs here have cargo build --release set https://nixpacks.com/docs/providers/rust
Rust | Nixpacks
App source + Nix packages + Docker = Image
Shah
Shah13mo ago
And start command is set too Or am I misinterpreting them
Brody
Brody13mo ago
but why did you think you needed to set them yourself?
Shah
Shah13mo ago
I just figured I'd do what the doc did
Brody
Brody13mo ago
haha well if it wasn’t clear by now, those fields are optional
Shah
Shah13mo ago
Yeah makes sense, a lot of magic happening here!
Brody
Brody13mo ago
indeed
Want results from more Discord servers?
Add your server