diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2024-11-12 11:52:23 +0100 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-12-10 18:44:06 +0100 |
| commit | cb7ada5409f171dae364f206a7fe3ff30fcba7cb (patch) | |
| tree | 5fc025795b5e9db9902ff0b1590b768f937c241b /rust/qemu-api/README.md | |
| parent | 8c2866750319fac3f7b641d1a097f3779952631d (diff) | |
| download | focaccia-qemu-cb7ada5409f171dae364f206a7fe3ff30fcba7cb.tar.gz focaccia-qemu-cb7ada5409f171dae364f206a7fe3ff30fcba7cb.zip | |
rust: allow using build-root bindings.rs from cargo
Right now, using cargo with QEMU requires copying by hand the bindings.rs to the source tree. Instead, we can use an include file to escape the cage of cargo's mandated source directory structure. By running cargo within meson's "devenv" and adding a MESON_BUILD_ROOT environment variable, it is easy for build.rs to find the file. However, the file must be symlinked into cargo's output directory for rust-analyzer to find it. Suggested-by: Junjie Mao <junjie.mao@hotmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/README.md')
| -rw-r--r-- | rust/qemu-api/README.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/qemu-api/README.md b/rust/qemu-api/README.md index 7588fa29ef..53810f4888 100644 --- a/rust/qemu-api/README.md +++ b/rust/qemu-api/README.md @@ -5,7 +5,7 @@ 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.rs +$ ninja bindings.inc.rs ``` ## Generate Rust documentation @@ -13,5 +13,5 @@ $ ninja bindings.rs To generate docs for this crate, including private items: ```sh -cargo doc --no-deps --document-private-items +pyvenv/bin/meson devenv -w ../rust cargo doc --no-deps --document-private-items ``` |