[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 01/11] rust: Build separate qemu_api_tools and qemu_api_sy
From: |
Zhao Liu |
Subject: |
Re: [PATCH v2 01/11] rust: Build separate qemu_api_tools and qemu_api_system |
Date: |
Thu, 20 Feb 2025 15:10:48 +0800 |
> diff --git a/rust/qemu-api/Cargo.toml b/rust/qemu-api/Cargo.toml
> index 57747bc934..bc0393add4 100644
> --- a/rust/qemu-api/Cargo.toml
> +++ b/rust/qemu-api/Cargo.toml
> @@ -25,6 +25,7 @@ version_check = "~0.9"
> default = ["debug_cell"]
> allocator = []
> debug_cell = []
> +system= []
With this new feature, we also need to declear the this feature flag to
pl011 & hpet's Cargo.toml:
qemu_api = { path = "../../../qemu-api", features = ["system"] }
> [lints]
> workspace = true
> diff --git a/rust/qemu-api/build.rs b/rust/qemu-api/build.rs
> index 471e6c633d..b14f9d4e4a 100644
> --- a/rust/qemu-api/build.rs
> +++ b/rust/qemu-api/build.rs
> @@ -16,7 +16,13 @@ fn main() -> Result<()> {
> let path = env::var("MESON_BUILD_ROOT")
> .unwrap_or_else(|_| format!("{}/src", env!("CARGO_MANIFEST_DIR")));
>
> - let file = format!("{}/bindings.inc.rs", path);
> + let basename = if cfg!(feature = "system") {
> + "bindings_system.inc.rs"
> + } else {
> + "bindings_tools.inc.rs"
> + };
> +
Missing to update rust/qemu-api/.gitignore :-)
(I'm still learning your series and currently just trying out the compilation.)
Thanks,
Zhao
- [PATCH v2 00/11] rust/block: Add minimal block driver bindings, Kevin Wolf, 2025/02/18
- [PATCH v2 02/11] meson: Add rust_block_ss and link tools with it, Kevin Wolf, 2025/02/18
- [PATCH v2 01/11] rust: Build separate qemu_api_tools and qemu_api_system, Kevin Wolf, 2025/02/18
- Re: [PATCH v2 01/11] rust: Build separate qemu_api_tools and qemu_api_system,
Zhao Liu <=
- [PATCH v2 05/11] rust/block: Add empty crate, Kevin Wolf, 2025/02/18
- [PATCH v2 04/11] rust/qemu-api: Add wrappers to run futures in QEMU, Kevin Wolf, 2025/02/18
- [PATCH v2 06/11] rust/block: Add I/O buffer traits, Kevin Wolf, 2025/02/18
- [PATCH v2 08/11] rust/block: Add driver module, Kevin Wolf, 2025/02/18
- [PATCH v2 09/11] rust/block: Add read support for block drivers, Kevin Wolf, 2025/02/18