Skip to content

Commit

Permalink
Merge pull request #353 from cgwalters/another-docsrs
Browse files Browse the repository at this point in the history
rust: Another attempt to fix docs.rs build
  • Loading branch information
jeckersb authored Sep 20, 2024
2 parents dfd76bb + d7f4774 commit bc4dd1a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions rust/composefs-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ license = "MIT OR Apache-2.0"
readme = "README.md"

[package.metadata.docs.rs]
features = ["dox"]
all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]

[package.metadata.system-deps.composefs]
name = "composefs"
version = "1"

[features]
dox = []
# Depend on 1.0.4 APIs
v1_0_4 = []

Expand Down
2 changes: 1 addition & 1 deletion rust/composefs-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fn main() {
#[cfg(not(feature = "dox"))]
#[cfg(not(docsrs))]
if let Err(s) = system_deps::Config::new().probe() {
println!("cargo:warning={s}");
std::process::exit(1);
Expand Down
6 changes: 5 additions & 1 deletion rust/composefs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ repository = "https://github.com/containers/composefs"
rust-version = "1.70.0"
readme = "README.md"

[package.metadata.docs.rs]
all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]

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

[features]
dox = ["composefs-sys/dox"]
# Depend on 1.0.4 APIs
v1_0_4 = ["composefs-sys/v1_0_4"]

Expand Down

0 comments on commit bc4dd1a

Please sign in to comment.