rpm-ostree/rust/Cargo.toml
Colin Walters a2bbc12812 rust: Enable lto by default
This avoids us leaking all of the Rust symbols as public
into our shared library.

Came up in team chat since one person tried to copy just `/usr/bin/rpm-ostree`
from the dev container into a target and got a linker crash; but
really we want to avoid all the duplicated symbols entirely.

(And we should investigate cross-language LTO because that's the
 only way to get full savings)
2020-10-29 19:00:14 +01:00

52 lines
1.3 KiB
TOML

[package]
name = "rpmostree-rust"
version = "0.1.0"
authors = ["Colin Walters <walters@verbum.org>", "Jonathan Lebon <jonathan@jlebon.com>"]
edition = "2018"
[dependencies]
anyhow = "1.0.33"
serde = "1.0.117"
serde_derive = "1.0.117"
serde_json = "1.0.59"
serde_yaml = "0.8.13"
libc = "0.2.80"
nix = "0.19.0"
glib-sys = "0.10.1"
glib = "0.10.3"
gio-sys = "0.10.1"
gio = "0.9.1"
ostree = { version = "0.9.1", features = ["v2020_4"] }
ostree-sys = "0.7.1"
tempfile = "3.1.0"
clap = "2.33.3"
structopt = "0.3.20"
openat = "0.1.19"
openat-ext = "^0.1.8"
curl = "0.4.34"
rayon = "1.5.0"
c_utf8 = "0.1.0"
rand = "0.7.3"
systemd = "0.7.0"
indicatif = "0.15.0"
lazy_static = "1.4.0"
envsubst = "0.2.0"
chrono = { version = "0.4.19", features = ["serde"] }
libdnf-sys = { path = "libdnf-sys", version = "0.1.0" }
[lib]
name = "rpmostree_rust"
path = "src/lib.rs"
crate-type = ["staticlib"]
[profile.release]
# Unwinding across FFI boundaries is undefined behavior, and anyways, we're
# [crash-only](https://en.wikipedia.org/wiki/Crash-only_software)
panic = "abort"
# We assume we're being delivered via e.g. RPM which supports split debuginfo
debug = true
# We need this to avoid leaking symbols, see
# https://internals.rust-lang.org/t/rust-staticlibs-and-optimizing-for-size/5746
lto = true