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