Today I published my first crate on crates.io. That went fine, but the documentation on docs.rs won't build. There is no problem building it locally.
As far as I understand, docs.rs tries to include the documentation of all dependencies, which fails because xkbcommon-sys is not installed there.
This is not what I want anyway, so what do I need to do to make docs.rs ommit all dependencies?
I tried to upload a new version with the following added to Cargo.toml:
It does not document dependencies, but rustdoc still needs the crate metadata of all dependencies to be able to do macro expansion, resolve the types of items, for inlined documentation and for resolving intra-doc links.
This is not true; docs.rs builds each package’s documentation on its own. However, your package’s documentation can only be built if your package can be built. rustdoc is somewhat more lenient than a normal rustc build, but it still needs the dependencies to be present.
So the way forward would be to learn docker and make a PR for crates-build-env, right?
But one thing does not make sense to me:
[INFO] [stderr] The system library `xkbcommon-x11` required by crate `xkbcommon-sys` was not found.
If it does not have xkbcommon-x11 already installed, why then is there documentation for xkbcommon-sys on docs.rs? Would that not have to fail for the same reason?
I tried making a PR, but the documentation on how to build the docker-image (Adding dependencies to the build environment - Rust Forge) is out of date and I decided not to spend time to learn docker at the moment. Instead I opened an issue requesting the package.
Maybe I’ll self-host the documentation until that is done.