Open bryanlarsen opened 1 year ago
I tried updating libflate to 1.4 and then ran cargo install cargo-bundle --path /work/cargo-bundle
but now it crashes with error: No [package.metadata.bundle] section in Cargo.toml
. Which is odd, because I definitely have [package.metadata.bundle]
. If I didn't, the original cargo-bundle wouldn't have got far enough to get the crash I originally reported.
We're using workspaces, if that makes a difference.
There are definitely known issues with how cargo-bundle currently interacts with workspaces. Any PRs to improve this situation would be very welcome.
Can confirm, i have the exact same error message:
thread 'main' panicked at /home/biochemic/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libflate-0.1.27/src/huffman.rs:217:19:
index out of bounds: the len is 15 but the index is 15
However i'm not using workspaces, but use [[bin]]
instead
i'm trying to bundle my app with cargo bundle --bin xyz
and cargo bundle --bin xyz --release
Curiously, the very first time i used cargo bundle ...
it worked and i was able to get a .deb file out on my system.
Relevant System info:
os: "Linux 22.04 Ubuntu", kernel: "6.4.0-060400-generic"
now the weird part is, i mentioned that it worked the first time.
I just did again, with a custom profile. I have an optimized release profile, that appears to be bundling fine.
That's the profile config i have in the Cargo.toml
:
[profile.release-opt]
inherits = "release"
codegen-units = 1
debug = false
lto = "fat"
incremental = false
opt-level = 3
overflow-checks = false
strip = "debuginfo"
panic = "abort"
When running with
cargo bundle --release
to create a deb we sometimes get the crash