Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs.rs build not working #46

Closed
dfrankland opened this issue Dec 29, 2019 · 7 comments · Fixed by #65
Closed

docs.rs build not working #46

dfrankland opened this issue Dec 29, 2019 · 7 comments · Fixed by #65

Comments

@dfrankland
Copy link
Member

dfrankland commented Dec 29, 2019

Error log from docs.rs

Related: stm32-rs/stm32f1xx-hal#154

Reported by @strom-und-spiele: #45 (comment)

Likely caused by the addition of this:

target = "thumbv7em-none-eabihf"

@dfrankland
Copy link
Member Author

We can change the default-target to thumbv7m-none-eabi, but docs.rs does not support it yet.

  [package.metadata.docs.rs]
  features = ["stm32f103", "rt", "stm32-usbd"]
+ default-target = "thumbv7m-none-eabi"

Until that's added, does anyone see issues with making default-target = "x86_64-unknown-linux-gnu"?

@dfrankland
Copy link
Member Author

Related docs.rs issues:
rust-lang/docs.rs#343

@strom-und-spiele
Copy link
Collaborator

As we currently don't have a [package.metadata.docs.rs] section, I don't see any harm in adding it. I'd suggest building for the discovery board as we provide all examples for it.

Does this one sum it up?

[package.metadata.docs.rs]
features = ["stm32f3DISCOVERY", "rt"]
# thumbv7m-none-eabi is not a supported target on docs.rs,
# however the target is not relevant for docs.
default-target = "x86_64-unknown-linux-gnu"

@dfrankland
Copy link
Member Author

dfrankland commented Dec 29, 2019

We do have a section here:

[package.metadata.docs.rs]

I think the comment you wrote also makes sense to add. stm32f3DISCOVERY isn't a feature though, so I am not too sure on that.

@strom-und-spiele
Copy link
Collaborator

Ah sorry, was falsely checking the .cargo/config file.
I added the stm32f3DISCOVERY feature a while ago when working with the adc Module (as I found it more convenient; https://github.com/stm32-rs/stm32f3xx-hal/pull/47/files#diff-80398c5faae3c069e4e6aa2ed11b28c0R52 ) Sorry for the confusion.

@Disasm
Copy link
Member

Disasm commented Jan 6, 2020

Seems to be a bug in docs.rs, because it tries building on the default target, but does not fetch a rustup target for it. Adding default-target = "x86_64-unknown-linux-gnu" should help.

@rubberduck203
Copy link
Contributor

I was able to confirm that the approach of the default target to the package meta-data works.

[package.metadata.docs.rs]
default-target = "x86_64-unknown-linux-gnu"

https://docs.rs/crate/stm32f3-discovery/0.1.3/source/Cargo.toml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants