Skip to content

Commit ffd490f

Browse files
mbrobbelalamb
andauthored
Use doc_auto_cfg, logo and favicon for docs.rs (#7145)
* Use `doc_auto_cfg` for docs.rs and add logo and icon * Rustfmt --------- Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
1 parent 5b04ca7 commit ffd490f

File tree

39 files changed

+154
-44
lines changed

39 files changed

+154
-44
lines changed

arrow-arith/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ rust-version = { workspace = true }
3030

3131
[lib]
3232
name = "arrow_arith"
33-
path = "src/lib.rs"
3433
bench = false
3534

35+
[package.metadata.docs.rs]
36+
all-features = true
37+
3638
[dependencies]
3739
arrow-array = { workspace = true }
3840
arrow-buffer = { workspace = true }
3941
arrow-data = { workspace = true }
4042
arrow-schema = { workspace = true }
4143
chrono = { workspace = true }
4244
num = { version = "0.4", default-features = false, features = ["std"] }
43-
44-
[dev-dependencies]

arrow-arith/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818
//! Arrow arithmetic and aggregation kernels
1919
20+
#![doc(
21+
html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg",
22+
html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg"
23+
)]
24+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2025
#![warn(missing_docs)]
2126
pub mod aggregate;
2227
#[doc(hidden)] // Kernels to be removed in a future release

arrow-array/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ rust-version = { workspace = true }
3030

3131
[lib]
3232
name = "arrow_array"
33-
path = "src/lib.rs"
3433
bench = false
3534

36-
3735
[target.'cfg(target_arch = "wasm32")'.dependencies]
3836
ahash = { version = "0.8", default-features = false, features = ["compile-time-rng"] }
3937

@@ -50,6 +48,9 @@ num = { version = "0.4.1", default-features = false, features = ["std"] }
5048
half = { version = "2.1", default-features = false, features = ["num-traits"] }
5149
hashbrown = { version = "0.15.1", default-features = false }
5250

51+
[package.metadata.docs.rs]
52+
all-features = true
53+
5354
[features]
5455
ffi = ["arrow-schema/ffi", "arrow-data/ffi"]
5556
force_validate = []
@@ -58,8 +59,6 @@ force_validate = []
5859
rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] }
5960
criterion = { version = "0.5", default-features = false }
6061

61-
[build-dependencies]
62-
6362
[[bench]]
6463
name = "occupancy"
6564
harness = false

arrow-array/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,11 @@
221221
//! [DataFusion]: https://github.com/apache/arrow-datafusion
222222
//! [RecordBatchStream]: https://docs.rs/datafusion/latest/datafusion/execution/trait.RecordBatchStream.html
223223
224+
#![doc(
225+
html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg",
226+
html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg"
227+
)]
228+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
224229
#![deny(rustdoc::broken_intra_doc_links)]
225230
#![warn(missing_docs)]
226231

arrow-avro/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ rust-version = { workspace = true }
3030

3131
[lib]
3232
name = "arrow_avro"
33-
path = "src/lib.rs"
3433
bench = false
3534

35+
[package.metadata.docs.rs]
36+
all-features = true
37+
3638
[features]
3739
default = ["deflate", "snappy", "zstd"]
3840
deflate = ["flate2"]
@@ -49,7 +51,5 @@ snap = { version = "1.0", default-features = false, optional = true }
4951
zstd = { version = "0.13", default-features = false, optional = true }
5052
crc = { version = "3.0", optional = true }
5153

52-
5354
[dev-dependencies]
5455
rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] }
55-

arrow-avro/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
//! [Apache Arrow]: https://arrow.apache.org
2121
//! [Apache Avro]: https://avro.apache.org/
2222
23+
#![doc(
24+
html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg",
25+
html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg"
26+
)]
27+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2328
#![warn(missing_docs)]
2429
#![allow(unused)] // Temporary
2530

arrow-buffer/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ rust-version = { workspace = true }
3030

3131
[lib]
3232
name = "arrow_buffer"
33-
path = "src/lib.rs"
3433
bench = false
3534

35+
[package.metadata.docs.rs]
36+
all-features = true
37+
3638
[dependencies]
3739
bytes = { version = "1.4" }
3840
num = { version = "0.4", default-features = false, features = ["std"] }
@@ -42,8 +44,6 @@ half = { version = "2.1", default-features = false }
4244
criterion = { version = "0.5", default-features = false }
4345
rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] }
4446

45-
[build-dependencies]
46-
4747
[[bench]]
4848
name = "bit_mask"
4949
harness = false

arrow-buffer/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818
//! Low-level buffer abstractions for [Apache Arrow Rust](https://docs.rs/arrow)
1919
20+
#![doc(
21+
html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg",
22+
html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg"
23+
)]
24+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2025
// used by [`buffer::mutable::dangling_ptr`]
2126
#![cfg_attr(miri, feature(strict_provenance))]
2227
#![warn(missing_docs)]

arrow-cast/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@ rust-version = { workspace = true }
3030

3131
[lib]
3232
name = "arrow_cast"
33-
path = "src/lib.rs"
3433
bench = false
3534

3635
[package.metadata.docs.rs]
37-
features = ["prettyprint"]
36+
all-features = true
3837

3938
[features]
4039
prettyprint = ["comfy-table"]
@@ -60,8 +59,6 @@ criterion = { version = "0.5", default-features = false }
6059
half = { version = "2.1", default-features = false }
6160
rand = "0.8"
6261

63-
[build-dependencies]
64-
6562
[[bench]]
6663
name = "parse_timestamp"
6764
harness = false

arrow-cast/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818
//! Functions for converting from one data type to another in [Apache Arrow](https://docs.rs/arrow)
1919
20+
#![doc(
21+
html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg",
22+
html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg"
23+
)]
24+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2025
#![warn(missing_docs)]
2126
pub mod cast;
2227
pub use cast::*;

0 commit comments

Comments
 (0)