Skip to content

Conversation

hug-dev
Copy link
Contributor

@hug-dev hug-dev commented Aug 23, 2020

Some modules of this repo are gated by the various targets and hence docs.rs does not show the documentation for them! Like the Armv8-M ones for example and the cmse module.

docs.rs now allows building for specific target and since this PR even for targets available via rustup!

The stm32f3_discovery crate does it, look at "Platform" on docs.rs.

So I think it would be very neat to have on cortex-m and I proposing to add the following targets. The first one will show by default, I choosed the latest and greatest for that 😄

I tested locally with cargo doc --target ... for all of them.

@hug-dev hug-dev requested a review from a team as a code owner August 23, 2020 13:32
@rust-highfive
Copy link

r? @jonas-schievink

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cortex-m labels Aug 23, 2020
Copy link
Contributor

@jonas-schievink jonas-schievink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a good idea. It would be even better if we used #[doc(cfg)] throughout the crate, then we only have to build for thumbv8-hf but users would see which features are available when.

Cargo.toml Outdated
Comment on lines 24 to 30
targets = ["thumbv8m.main-none-eabihf",
"thumbv6m-none-eabi",
"thumbv7em-none-eabi",
"thumbv7em-none-eabihf",
"thumbv7m-none-eabi",
"thumbv8m.base-none-eabi",
"thumbv8m.main-none-eabi"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
targets = ["thumbv8m.main-none-eabihf",
"thumbv6m-none-eabi",
"thumbv7em-none-eabi",
"thumbv7em-none-eabihf",
"thumbv7m-none-eabi",
"thumbv8m.base-none-eabi",
"thumbv8m.main-none-eabi"
targets = [
"thumbv8m.main-none-eabihf",
"thumbv6m-none-eabi",
"thumbv7em-none-eabi",
"thumbv7em-none-eabihf",
"thumbv7m-none-eabi",
"thumbv8m.base-none-eabi",
"thumbv8m.main-none-eabi",

Signed-off-by: Hugues de Valon <[email protected]>
Copy link
Contributor

@jonas-schievink jonas-schievink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 23, 2020

Build succeeded:

@bors bors bot merged commit 6dcd9f4 into rust-embedded:master Aug 23, 2020
@hug-dev
Copy link
Contributor Author

hug-dev commented Aug 23, 2020

Could a quick patch release be done for that to be up on docs.rs 😬 ? Or if there is a release that is going to be done in the next few weeks that's fine as well.

@adamgreig
Copy link
Member

Could a quick patch release be done for that to be up on docs.rs ? Or if there is a release that is going to be done in the next few weeks that's fine as well.

Hopefully we can get 0.7 out soon which will include this.

robyoung added a commit to robyoung/volatile-register that referenced this pull request Aug 9, 2021
Since rust-embedded/cortex-m#256 (released in v0.7) the docs links from
cortex-m to this crate link to the target specific version. As these
targets are not included on this crate the links fail.

For example; see the links to RO on this page https://docs.rs/cortex-m/0.7.3/cortex_m/peripheral/cpuid/struct.RegisterBlock.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cortex-m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants