Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:
- run: cargo clippy --all-targets --target ${{ matrix.target }} -- -D warnings
- run: cargo clippy --all-targets --all-features --target ${{ matrix.target }} -- -D warnings

- run: cargo doc --no-deps --features docs
- run: cargo +nightly doc --no-deps
env:
RUSTDOCFLAGS: -Dwarnings
RUSTDOCFLAGS: "--cfg docsrs -Dwarnings"

- name: check unused dependencies
uses: bnjbvr/cargo-machete@v0.9.2
Expand All @@ -71,9 +71,9 @@ jobs:
- run: cargo +nightly fmt -p containerd-shim -p containerd-shim-protos -p containerd-client -- --check

- run: cargo clippy -p containerd-shim -p containerd-shim-protos -- -D warnings
- run: cargo doc --no-deps -p containerd-shim -p containerd-shim-protos -p containerd-client
- run: cargo +nightly doc --no-deps -p containerd-shim -p containerd-shim-protos -p containerd-client
env:
RUSTDOCFLAGS: -Dwarnings
RUSTDOCFLAGS: "--cfg docsrs -Dwarnings"

tests:
name: Tests
Expand Down
4 changes: 0 additions & 4 deletions crates/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,12 @@ tokio = { workspace = true, features = ["rt", "macros", "net"] }

[features]
connect = ["tokio", "tower"]
docs = []

# Technically Tonic doesn't require Tokio and Tower dependencies here.
# However we need them to implement `connect` helper and it's highly unlikely
# that Tonic will be used with any other async runtime (see https://github.com/hyperium/tonic/issues/152)
# So we enable `connect` feature by default (use `--no-default-features` otherwise).
default = ["connect"]

[package.metadata.docs.rs]
features = ["docs"]

[package.metadata.cargo-machete]
ignored = ["prost", "tonic-prost"]
2 changes: 1 addition & 1 deletion crates/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

#![cfg_attr(feature = "docs", doc = include_str!("../README.md"))]
#![cfg_attr(docsrs, doc = include_str!("../README.md"))]
// No way to derive Eq with tonic :(
// See https://github.com/hyperium/tonic/issues/1056
#![allow(clippy::derive_partial_eq_without_eq)]
Expand Down
6 changes: 0 additions & 6 deletions crates/logging/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,3 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true

[features]
docs = []

[package.metadata.docs.rs]
features = ["docs"]
2 changes: 1 addition & 1 deletion crates/logging/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

#![cfg_attr(feature = "docs", doc = include_str!("../README.md"))]
#![cfg_attr(docsrs, doc = include_str!("../README.md"))]

use std::{env, fmt, fs, os::unix::io::FromRawFd, process};

Expand Down
4 changes: 0 additions & 4 deletions crates/runc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ homepage.workspace = true

[features]
async = ["tokio", "async-trait", "tokio-pipe"]
docs = []

[dependencies]
libc.workspace = true
Expand All @@ -30,6 +29,3 @@ time = { workspace = true, features = ["serde", "std"] }
async-trait = { workspace = true, optional = true }
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "process", "sync", "fs", "io-util", "net", "time"], optional = true }
tokio-pipe = { version = "0.2.12", default-features = false, optional = true }

[package.metadata.docs.rs]
features = ["docs"]
2 changes: 1 addition & 1 deletion crates/runc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* limitations under the License.
*/

#![cfg_attr(feature = "docs", doc = include_str!("../README.md"))]
#![cfg_attr(docsrs, doc = include_str!("../README.md"))]

//! A crate for consuming the runc binary in your Rust applications, similar to
//! [go-runc](https://github.com/containerd/go-runc) for Go.
Expand Down
4 changes: 0 additions & 4 deletions crates/shim-protos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ homepage.workspace = true
default = []
async = ["ttrpc/async", "async-trait"]
sandbox = []
docs = []

[[example]]
name = "shim-proto-server"
Expand Down Expand Up @@ -60,6 +59,3 @@ ctrlc = { version = "3.5", default-features = false, features = ["termination"]
simple_logger = { workspace = true, features = ["stderr"] }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
crossbeam = { workspace = true, features = ["crossbeam-channel"] } # Used by create_ttrpc_context()

[package.metadata.docs.rs]
features = ["docs"]
2 changes: 1 addition & 1 deletion crates/shim-protos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

#![cfg_attr(feature = "docs", doc = include_str!("../README.md"))]
#![cfg_attr(docsrs, doc = include_str!("../README.md"))]
#![allow(warnings)]

pub use protobuf;
Expand Down
4 changes: 0 additions & 4 deletions crates/shim/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ homepage.workspace = true
[features]
async = ["async-trait", "containerd-shim-protos/async", "futures", "tokio"]
tracing = ["dep:tracing"]
docs = []

[[example]]
name = "skeleton_async"
Expand Down Expand Up @@ -73,6 +72,3 @@ windows-sys = { version = "0.52.0", default-features = false, features = [

[dev-dependencies]
tempfile.workspace = true

[package.metadata.docs.rs]
features = ["docs"]
3 changes: 2 additions & 1 deletion crates/shim/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
limitations under the License.
*/

#![cfg_attr(feature = "docs", doc = include_str!("../README.md"))]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(docsrs, doc = include_str!("../README.md"))]

use std::{fmt::Write as _, fs::File, path::PathBuf};
#[cfg(windows)]
Expand Down
6 changes: 0 additions & 6 deletions crates/snapshots/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ license.workspace = true
repository.workspace = true
homepage.workspace = true

[features]
docs = []

[dependencies]
async-stream = "0.3.6"
futures = { workspace = true, features = ["std", "alloc"] }
Expand All @@ -38,8 +35,5 @@ tonic = { workspace = true, features = ["server", "router"] }
[build-dependencies]
tonic-prost-build.workspace = true

[package.metadata.docs.rs]
features = ["docs"]

[package.metadata.cargo-machete]
ignored = ["prost", "tonic-prost"]
2 changes: 1 addition & 1 deletion crates/snapshots/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

#![cfg_attr(feature = "docs", doc = include_str!("../README.md"))]
#![cfg_attr(docsrs, doc = include_str!("../README.md"))]
// No way to derive Eq with tonic :(
// See https://github.com/hyperium/tonic/issues/1056
#![allow(clippy::derive_partial_eq_without_eq)]
Expand Down
Loading