Not able to deploy Rust application. Rocket Template

Eendlessl8p5/13/2023
I'm using 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.
Eendlessl8p5/13/2023
Seems like binaries not being moved into deploy stage
Eendlessl8p5/13/2023
I simply need to run deploy as cargo build --release and then run cargo run --bin api
Eendlessl8p5/13/2023
@erikh @Brody who would be the best people to help with this? Thank you!
Bbrody5/13/2023
erikh would, i dont know rust
UUUnknown User5/13/2023
4 Messages Not Public
Sign In & Join Server To View
Bbrody5/13/2023
id also just like to ask, whats wrong with the default way nixpacks would build and start your rust app?
UUUnknown User5/13/2023
3 Messages Not Public
Sign In & Join Server To View
Bbrody5/13/2023
im sure you will get to know it in time 😉
UUUnknown User5/13/2023
2 Messages Not Public
Sign In & Join Server To View
Eendlessl8p5/13/2023
I have a workspace setup and I have multiple binaries, rust suggest to put binaries under bin folder
Eendlessl8p5/13/2023
NIXPACKS_NO_MUSL=1 solved the issue, no idea why tho
Eendlessl8p5/14/2023
9a3dfee5-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?
Eendlessl8p5/14/2023
https://github.com/gemwalletcom/api here is the code, there is two binaries, client and deamon
Eendlessl8p5/14/2023
This is what I get
Eendlessl8p5/14/2023
@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
Eendlessl8p5/14/2023
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 folder
Eendlessl8p5/14/2023
This is pretty standard setup for cargo workspace with multiple binaries as api and worker
Eendlessl8p5/14/2023
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