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