kornelski / cargo-deb

Make Debian packages directly from Rust/Cargo projects
https://lib.rs/cargo-deb
MIT License
432 stars 52 forks source link

Including example binaries does not work #91

Closed newpavlov closed 1 year ago

newpavlov commented 1 year ago

I want to include an example binary into generated deb packet. In my Cargo.toml I have:

assets = [
    ["target/release/examples/foo", "usr/bin/", "755"],
    # ... 
]

But by running cargo deb, I get the following error:

error: no bin target named `foo`.

Why cargo deb insists on having the binary target and what can I do to resolve this issue?

newpavlov commented 1 year ago

The --no-build flag resolves the issue.

kornelski commented 1 year ago

I used to run cargo build --all, but that was slow and wasteful for workspaces, so now I run --bin foo for each binary requested, but I haven't considered the special case of examples.