aboutsummaryrefslogtreecommitdiff
path: root/rust/qemu-api
diff options
context:
space:
mode:
Diffstat (limited to 'rust/qemu-api')
-rw-r--r--rust/qemu-api/README.md10
-rw-r--r--rust/qemu-api/build.rs9
2 files changed, 13 insertions, 6 deletions
diff --git a/rust/qemu-api/README.md b/rust/qemu-api/README.md
index 53810f4..ed1b7ab 100644
--- a/rust/qemu-api/README.md
+++ b/rust/qemu-api/README.md
@@ -5,13 +5,15 @@ This library exports helper Rust types, Rust macros and C FFI bindings for inter
The C bindings can be generated with `bindgen`, using this build target:
```console
-$ ninja bindings.inc.rs
+$ make bindings.inc.rs
```
## Generate Rust documentation
-To generate docs for this crate, including private items:
+Common Cargo tasks can be performed from the QEMU build directory
-```sh
-pyvenv/bin/meson devenv -w ../rust cargo doc --no-deps --document-private-items
+```console
+$ make clippy
+$ make rustfmt
+$ make rustdoc
```
diff --git a/rust/qemu-api/build.rs b/rust/qemu-api/build.rs
index 40644d5..471e6c6 100644
--- a/rust/qemu-api/build.rs
+++ b/rust/qemu-api/build.rs
@@ -20,8 +20,13 @@ fn main() -> Result<()> {
let file = Path::new(&file);
if !Path::new(&file).exists() {
panic!(concat!(
- "No generated C bindings found! If you want to run `cargo`, start a subshell\n",
- "with `meson devenv`, or point MESON_BUILD_ROOT to the top of the build tree."
+ "\n",
+ " No generated C bindings found! Maybe you wanted one of\n",
+ " `make clippy`, `make rustfmt`, `make rustdoc`?\n",
+ "\n",
+ " For other uses of `cargo`, start a subshell with\n",
+ " `pyvenv/bin/meson devenv`, or point MESON_BUILD_ROOT to\n",
+ " the top of the build tree."
));
}