diff --git a/rust-bindings/rust/.gitlab-ci.yml b/rust-bindings/rust/.gitlab-ci.yml index bc759eb0..2c88d1b7 100644 --- a/rust-bindings/rust/.gitlab-ci.yml +++ b/rust-bindings/rust/.gitlab-ci.yml @@ -42,7 +42,7 @@ libostree_nightly: pages: stage: doc script: - - cargo doc --verbose --all-features + - cargo doc --verbose --features dox - cp -r target/doc public artifacts: paths: diff --git a/rust-bindings/rust/libostree-sys/Cargo.toml b/rust-bindings/rust/libostree-sys/Cargo.toml index 248f696f..5519bcc8 100644 --- a/rust-bindings/rust/libostree-sys/Cargo.toml +++ b/rust-bindings/rust/libostree-sys/Cargo.toml @@ -39,14 +39,17 @@ v2018_7 = ["v2018_6"] name = "libostree_sys" [package] -authors = ["Felix Krull "] +authors = ["Felix Krull"] build = "build.rs" categories = ["external-ffi-bindings"] description = "FFI bindings to libostree-1" documentation = "https://fkrull.gitlab.io/rust-libostree/libostree_sys" keywords = ["ffi", "ostree", "libostree"] license = "MIT" -links = "ostree" +links = "ostree-1" name = "libostree-sys" repository = "https://gitlab.com/fkrull/rust-libostree" -version = "0.1.2" +version = "0.1.3" + +[package.metadata.docs.rs] +features = ["dox"] diff --git a/rust-bindings/rust/libostree-sys/build.rs b/rust-bindings/rust/libostree-sys/build.rs index ba199e44..58a32260 100644 --- a/rust-bindings/rust/libostree-sys/build.rs +++ b/rust-bindings/rust/libostree-sys/build.rs @@ -62,6 +62,10 @@ fn find() -> Result<(), Error> { return Ok(()) } + if cfg!(feature = "dox") { + return Ok(()) + } + let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); let hardcode_shared_libs = target.contains("windows"); diff --git a/rust-bindings/rust/libostree/Cargo.toml b/rust-bindings/rust/libostree/Cargo.toml index 5e02e58d..b2104bf3 100644 --- a/rust-bindings/rust/libostree/Cargo.toml +++ b/rust-bindings/rust/libostree/Cargo.toml @@ -4,6 +4,9 @@ version = "0.1.0" documentation = "https://fkrull.gitlab.io/rust-libostree/libostree" +[package.metadata.docs.rs] +features = ["dox"] + [lib] name = "libostree"