4ce5f42d12
This allows us to fully use cxx-rs with `extern "C++"`. Now we do call back into the C/C++ today, but it only works outside of cargo/Rust's knowledge. Most notably, it means we can't use our C code in `cargo test`. And that's a problem for moving some C/C++ code to Rust, because we want to port the unit tests too. For now, re-declare our dependencies and part of the build system inside the Cargo build. However, this is also an important step towards using Cargo as our *sole* build system. We don't add build dependencies too often, so the short term duplication should be OK. However, a major unfortunate side effect of this is that we now need to serialize the build process; almost all the C/C++ comes first (`librpmostreeinternals.la`) and then the Rust build, then we finally generate the executable with both. The only way out of this really is to move more of the C/C++ build into Cargo, and we probably want to refactor into internal crates.
80 lines
1.9 KiB
TOML
80 lines
1.9 KiB
TOML
[package]
|
|
name = "rpmostree-rust"
|
|
version = "0.1.0"
|
|
authors = ["Colin Walters <walters@verbum.org>", "Jonathan Lebon <jonathan@jlebon.com>"]
|
|
edition = "2018"
|
|
links = "rpmostreeinternals"
|
|
|
|
# This currently needs to duplicate the libraries in configure.ac
|
|
# until we unify on Cargo as our build system
|
|
[package.metadata.system-deps]
|
|
libarchive = "3.0"
|
|
jsonglib = { name = "json-glib-1.0", version = "1" }
|
|
polkitgobject = { name = "polkit-gobject-1", version = "0" }
|
|
rpm = "4"
|
|
librepo = "1"
|
|
libsolv = "0.7"
|
|
|
|
[dependencies]
|
|
anyhow = "1.0.38"
|
|
paste = "1.0"
|
|
serde = { version = "1.0.123", features = ["derive"] }
|
|
serde_derive = "1.0.118"
|
|
serde_json = "1.0.61"
|
|
serde_yaml = "0.8.15"
|
|
libc = "0.2.82"
|
|
cxx = "1.0.28"
|
|
nix = "0.19.1"
|
|
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.2.0"
|
|
clap = "2.33.3"
|
|
structopt = "0.3.21"
|
|
openat = "0.1.19"
|
|
openat-ext = "^0.1.11"
|
|
curl = "0.4.34"
|
|
rayon = "1.5.0"
|
|
c_utf8 = "0.1.0"
|
|
rand = "0.8.3"
|
|
phf = { version = "0.8", features = ["macros"] }
|
|
systemd = "0.8.2"
|
|
indicatif = "0.15.0"
|
|
lazy_static = "1.4.0"
|
|
envsubst = "0.2.0"
|
|
subprocess = "0.2.6"
|
|
chrono = { version = "0.4.19", features = ["serde"] }
|
|
libdnf-sys = { path = "rust/libdnf-sys", version = "0.1.0" }
|
|
memfd = "0.3.0"
|
|
rust-ini = "0.16.1"
|
|
os-release = "0.1.0"
|
|
|
|
[build-dependencies]
|
|
cbindgen = "0.16.0"
|
|
system-deps = "2.0"
|
|
anyhow = "1.0"
|
|
|
|
[lib]
|
|
name = "rpmostree_rust"
|
|
path = "rust/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
|
|
|
|
[features]
|
|
sqlite-rpmdb-default = []
|
|
fedora-integration = []
|
|
|
|
default = []
|