R
Railway11mo ago
Draak

Deploying Rust tries to copy binaries that don't exist.

I'm not using my own nixpacks.toml, and railway is attempting to copy binaries that it doesn't need to run and don't exist. (I tried my own nixpacks.toml but I'd prefer to deploy this way. I'll open up a separate ticket for my problems with my own nixpacks.toml if I need to). I would expect it to only copy tklbot. Cargo.toml
[package]
name = "tklbot"
version = "0.3.0"
edition = "2021"
default-run = "tklbot"

[lib]
name = "tklbot"
path = "src/lib.rs"

[[bin]]
name = "tklbot"
path = "src/main.rs"

[[bin]]
name = "integration-tests"
path = "src/bin/integration_tests.rs"

[dependencies]
...
[package]
name = "tklbot"
version = "0.3.0"
edition = "2021"
default-run = "tklbot"

[lib]
name = "tklbot"
path = "src/lib.rs"

[[bin]]
name = "tklbot"
path = "src/main.rs"

[[bin]]
name = "integration-tests"
path = "src/bin/integration_tests.rs"

[dependencies]
...
from the railway build logs:
╔═════════════════════ Nixpacks v1.15.0 ═════════════════════╗
║ setup │ binutils, gcc, rust-bin.stable.latest.default ║
║────────────────────────────────────────────────────────────║
║ build │ mkdir -p bin ║
║ │ cargo build --release ║
║ │ cp target/release/tklbot bin ║
║ │ cp target/release/db bin ║
║ │ cp target/release/logger bin ║
║ │ cp target/release/mod bin ║
║ │ cp target/release/scoped bin ║
║ │ cp target/release/tests bin ║
║ │ cp target/release/integration_tests bin ║
║────────────────────────────────────────────────────────────║
║ start │ ./bin/tklbot ║
╚════════════════════════════════════════════════════════════╝
╔═════════════════════ Nixpacks v1.15.0 ═════════════════════╗
║ setup │ binutils, gcc, rust-bin.stable.latest.default ║
║────────────────────────────────────────────────────────────║
║ build │ mkdir -p bin ║
║ │ cargo build --release ║
║ │ cp target/release/tklbot bin ║
║ │ cp target/release/db bin ║
║ │ cp target/release/logger bin ║
║ │ cp target/release/mod bin ║
║ │ cp target/release/scoped bin ║
║ │ cp target/release/tests bin ║
║ │ cp target/release/integration_tests bin ║
║────────────────────────────────────────────────────────────║
║ start │ ./bin/tklbot ║
╚════════════════════════════════════════════════════════════╝
5 Replies
Percy
Percy11mo ago
Project ID: 2090e121-cc62-4fbe-9114-5349121f7893
Draak
Draak11mo ago
2090e121-cc62-4fbe-9114-5349121f7893
Brody
Brody11mo ago
this would require using your own nixpacks.toml, so let's see what you had for that
josh
josh11mo ago
for deploying rust stuff i found that in the end i ended up having to just write my own dockerfile and use cargo-chef
Draak
Draak11mo ago
I ended up figuring out my nixpacks woes. I was doing bin/tklbot instead of ./bin/tklbot for my start command 🤦‍♂️ Good to know that's the point I need my own nixpacks. thanks for the help!