rust-vmm / vm-memory

Virtual machine's guest memory crate
Apache License 2.0
299 stars 97 forks source link

Update documentation #285

Closed jacksonbrim closed 5 months ago

jacksonbrim commented 5 months ago

Summary of the PR

Annotated modules in lib.rs to indicate their feature dependencies such that it is reflected in the docs, enhancing documentation clarity for users on docs.rs.

Building Documentation Locally:

To build the documentation locally with the specified feature flags, use the following command:

RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --open

This command sets the necessary RUSTDOCFLAGS to include conditional compilation flags and features specific to our project, ensuring the generated documentation reflects the same level of detail and conditions as seen on docs.rs.

jacksonbrim commented 5 months ago

Hi @jacksonbrim, Thank you for your contribution! We've done a similar thing on some other rust-vmm crates (e.g. rust-vmm/linux-loader@26a0d86), so it'd be nice to keep the implementation consistent (e.g. use doc_auto_cfg) across the crates. Could you have a look at the comments below to see if they make sense? Thanks!

Yes, that looks much better.