R
Railway8mo 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
Percy8mo ago
Project ID: 030df044-ed0b-4754-bc9f-8e747b17ff07
Shah
Shah8mo ago
Am I missing something here?
Solution
Brody
Brody8mo ago
have you tried letting nixpacks build it without specifying any build or start commands yourself?
Shah
Shah8mo 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
Brody8mo ago
can i ask why you thought you needed to set your own build and start commands?
Shah
Shah8mo ago
The docs here have cargo build --release set https://nixpacks.com/docs/providers/rust
Rust | Nixpacks
App source + Nix packages + Docker = Image
Shah
Shah8mo ago
And start command is set too Or am I misinterpreting them
Brody
Brody8mo ago
but why did you think you needed to set them yourself?
Shah
Shah8mo ago
I just figured I'd do what the doc did
Brody
Brody8mo ago
haha well if it wasn’t clear by now, those fields are optional
Shah
Shah8mo ago
Yeah makes sense, a lot of magic happening here!
Brody
Brody8mo ago
indeed