R
Join ServerRailway
✋|help
Not able to deploy Rust application. Rocket Template
I'm using
Whenever I call
No binaries here.
cargo build --release
to build and then cargo run --binary api
but it does not product any binary for the deploy command. Whenever I call
ls -R ./
it will return:./:
bin
./bin:
api
./bin/api:
Cargo.lock
Cargo.toml
src
./bin/api/src:
main.rs
No binaries here.
Seems like binaries not being moved into deploy stage
I simply need to run deploy as
cargo build --release
and then run cargo run --bin api
@erikh @Brody who would be the best people to help with this? Thank you!
erikh would, i dont know rust
4 Messages Not Public
Sign In & Join Server To View
id also just like to ask, whats wrong with the default way nixpacks would build and start your rust app?
3 Messages Not Public
Sign In & Join Server To View
im sure you will get to know it in time 😉
2 Messages Not Public
Sign In & Join Server To View
I have a workspace setup and I have multiple binaries, rust suggest to put binaries under
bin
folderNIXPACKS_NO_MUSL=1
solved the issue, no idea why tho9a3dfee5-c7f3-46c4-b704-cb67b7289326
and bbe995ee-c6df-4d23-b96f-15f189f8d8a9
project ids, I was not able to deploy yet anything from the cargo workspace, can you take a look?https://github.com/gemwalletcom/api here is the code, there is two binaries, client and deamon
This is what I get
@erikh @Brody can you please help here to figure it out? Quite confident something wrong with nixpack setup. I also tried to set
NIXPACKS_RUST_BIN
and NIXPACKS_CARGO_WORKSPACE
ERROR: failed to solve: process "/bin/bash -ol pipefail -c cp target/release/client bin" did not complete successfully: exit code: 1
Seems like it's not able to move the binary to the bin folderThis is pretty standard setup for cargo workspace with multiple binaries as api and worker
Solution was not to put binary into /bin folder and keep them in the root, because it had conflict with the folder and the name of the binary