On Fri, Oct 25, 2024 at 06:01:59PM +0200, Paolo Bonzini wrote:
> Date: Fri, 25 Oct 2024 18:01:59 +0200
> From: Paolo Bonzini <pbonz...@redhat.com>
> Subject: [PATCH 14/23] rust: create a cargo workspace
> X-Mailer: git-send-email 2.47.0
> 
> Workspaces allows tracking dependencies for multiple crates at once,
> by having a single Cargo.lock file at the top of the rust/ tree.
> Because QEMU's Cargo.lock files have to be synchronized with the versions
> of crates in subprojects/, using a workspace avoids the need to copy
> over the Cargo.lock file when adding a new device (and thus a new crate)
> under rust/hw/.
> 
> In addition, workspaces let cargo download and build dependencies just
> once.  While right now we have one leaf crate (hw/char/pl011), this
> will not be the case once more devices are added.
> 
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> ---
>  rust/{hw/char/pl011 => }/Cargo.lock |  0
>  rust/Cargo.toml                     |  7 ++++
>  rust/hw/char/pl011/Cargo.toml       |  3 --
>  rust/qemu-api-macros/Cargo.lock     | 48 -------------------------
>  rust/qemu-api-macros/Cargo.toml     |  3 --
>  rust/qemu-api/Cargo.lock            | 54 -----------------------------
>  rust/qemu-api/Cargo.toml            |  3 --
>  7 files changed, 7 insertions(+), 111 deletions(-)
>  rename rust/{hw/char/pl011 => }/Cargo.lock (100%)
>  create mode 100644 rust/Cargo.toml
>  delete mode 100644 rust/qemu-api-macros/Cargo.lock
>  delete mode 100644 rust/qemu-api/Cargo.lock
 
Workspace is a good idea and "cargo build" works fine on my side.

Reviewed-by: Zhao Liu <zhao1....@intel.com>


Reply via email to