Message ID | 20250605-rust-docs-v2-0-883a0a3872c0@linaro.org |
---|---|
Headers | show |
Series | doc: add rust docs | expand |
On 05-06-25, 10:13, Bartosz Golaszewski wrote: > While full integration of Rust docs with sphinx is currently hard, if > not impossible, we can still follow the pattern we used for GLib > bindings and generate the docs using cargo, then linking to them from > the sphinx page. > > While at it: fix some minor issues in conf.py. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- > Changes in v2: > - Pass --package=libgpiod to cargo doc to limit the scope of the docs to > the user-facing API of libgpiod rust bindings > - Drop LD_LIBRARY_PATH and SYSTEM_DEPS_LIBGPIOD_SEARCH_NATIVE variables > from the environment of cargo doc as they're not needed at build-time > - Link to v1: https://lore.kernel.org/r/20250604-rust-docs-v1-0-8ff23924a917@linaro.org > > --- > Bartosz Golaszewski (3): > doc: reformat conf.py with black > doc: improve the readability of the prefix variable > doc: integrate rust docs into the sphinx build Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
While full integration of Rust docs with sphinx is currently hard, if not impossible, we can still follow the pattern we used for GLib bindings and generate the docs using cargo, then linking to them from the sphinx page. While at it: fix some minor issues in conf.py. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> --- Changes in v2: - Pass --package=libgpiod to cargo doc to limit the scope of the docs to the user-facing API of libgpiod rust bindings - Drop LD_LIBRARY_PATH and SYSTEM_DEPS_LIBGPIOD_SEARCH_NATIVE variables from the environment of cargo doc as they're not needed at build-time - Link to v1: https://lore.kernel.org/r/20250604-rust-docs-v1-0-8ff23924a917@linaro.org --- Bartosz Golaszewski (3): doc: reformat conf.py with black doc: improve the readability of the prefix variable doc: integrate rust docs into the sphinx build .readthedocs.yaml | 3 +++ docs/conf.py | 43 ++++++++++++++++++++++++++++++++++--------- docs/rust_api.rst | 22 ++++++++++++++-------- 3 files changed, 51 insertions(+), 17 deletions(-) --- base-commit: 088c66ef20662b76eebf03e71f11196a5ae14b33 change-id: 20250604-rust-docs-502d6caf207b Best regards,