Skip to content

Commit 1a46975

Browse files
committed
Only build docs for some MCUs on docs.rs
Sadly we are now starting to hit the limits of docs.rs with the amount of supported MCUs. Only build documentation for a subset there and mention that docs for the rest can be built locally. Ref: #98
1 parent 472b450 commit 1a46975

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ include = [
1919
]
2020

2121
[package.metadata.docs.rs]
22-
all-features = true
22+
features = ["docsrs"]
2323

2424
[features]
2525
device-selected = []
@@ -52,6 +52,11 @@ attiny88 = ["device-selected"]
5252
attiny1614 = ["device-selected"]
5353
rt = ["avr-device-macros"]
5454

55+
# Unfortunately, we can only build documentation for a subset of the supported
56+
# MCUs on docs.rs. If you think a very popular chip is missing from the list,
57+
# feel free to add it here.
58+
docsrs = ["rt", "atmega328p", "atmega32u4", "atmega2560", "attiny85", "atmega4809"]
59+
5560
[dependencies]
5661
bare-metal = "0.2.5"
5762
vcell = "0.1.2"

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
#![cfg_attr(feature = "attiny88", doc = "**attiny88**,")]
2929
//! and a few things which apply to AVR microcontrollers generally.
3030
//!
31+
#![cfg_attr(
32+
feature = "docsrs",
33+
doc = "**Warning**: The doc-build here on docs.rs is only for a subset of supported chips. Please build documentation locally if your MCU's registers are not documented here.\n\n"
34+
)]
3135
//! Which chips the crate is built for depends on the feature flag used.
3236
//! The following chips are available (using feature flags of the same name):
3337
//! * `at90usb1286`

0 commit comments

Comments
 (0)