vmsilo fork of vhost rust libraries
Introduce a dummy feature to hack around `cargo doc --all-features` always hitting the compile_error!(...) in vhost/src/lib.rs about incompatible features. This is happening because when documenting vhost-user-backend, cargo does not pass --cfg doc to dependencies, meaning the cfg(not(doc)) attribute that is supposed to eliminate this compile_error!() invokation when building docs does not actually trigger. Hence cargo doc fails. Introduce a custom cfg, which we tell docs.rs to set during documentation build, which disables the compile_error!(). Our CI also sets this flag for the rustdoc step (via an ugly `sed` in the pipeline definition). This cfg is also set by rust-vmm-ci for the cargo doc step. Note that we need both cfg(not(doc)) and cfg(not(RUTSDOC_disable_feature_compat_errors)), because lib.rs gets processed twice, onces by rustc (where the --cfg is passed via RUSTFLAGS), and once by rustdoc itself, where RUSTFLAGS are ignored, and instead the cfg(doc) macro comes into play (but rustdoc is only ran on the crate for which we are actually generating docs, not the dependencies). Signed-off-by: Patrick Roy <patrick.roy@linux.dev> |
||
|---|---|---|
| .buildkite | ||
| .cargo | ||
| .github | ||
| rust-vmm-ci@1b48931447 | ||
| vhost | ||
| vhost-user-backend | ||
| .gitignore | ||
| .gitmodules | ||
| Cargo.toml | ||
| CODEOWNERS | ||
| coverage_config_aarch64.json | ||
| coverage_config_x86_64.json | ||
| LICENSE | ||
| LICENSE-BSD-3-Clause | ||
| README.md | ||
vhost
The vhost workspace hosts libraries related to the vhost and vhost-user
protocols. It currently consists of the following crates:
vhost-> A pure rust library for vDPA, vhost and vhost-user.vhost-user-backend-> It provides a framework to implementvhost-userbackend services.