mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
![]() 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> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
meson.build | ||
README.md |
PL011 QEMU Device Model
This library implements a device model for the PrimeCell® UART (PL011) device in QEMU.
Build static lib
Host build target must be explicitly specified:
cargo build --target x86_64-unknown-linux-gnu
Replace host target triplet if necessary.
Generate Rust documentation
To generate docs for this crate, including private items:
cargo doc --no-deps --document-private-items --target x86_64-unknown-linux-gnu
To include direct dependencies like bilge
(bitmaps for register types):
cargo tree --depth 1 -e normal --prefix none \
| cut -d' ' -f1 \
| xargs printf -- '-p %s\n' \
| xargs cargo doc --no-deps --document-private-items --target x86_64-unknown-linux-gnu