Hello, I have a crate that requires special environment to be built, so I am publishing with --no-verify, and docs are not shown on docs.rs. But I can build the documentation locally using cargo doc. Is it possible for me to publish with my local docs?
If you can't use docs.rs, you can host your docs somewhere else and use the [package.documentation] field in your manifest to link to that, rather than docs.rs.
You can't.
But you can include a locally built header file and use that instead of building it locally based on whether you're on docsrs or not.
Builder on docs.rs sets DOCS_RS=1 env var, and can also set cfg or Cargo features based on Cargo.toml metadata, so you could put whatever hacks are needed to make it build in docs.rs environment.
There is GitHub - dtolnay/cargo-docs-rs: Imitate the documentation build that docs.rs would do which imitates the docs.rs build environment, which can help ensure your hacks for docs.rs works.
Additionally, you could use github pages or similar to host your own docs. I believe several embedded projects do this: esp-rs and embassy both do, and I seem to remember seeing others as well.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.