rust: Update Cargo.lock
PATCH 1/1 rust: Update Cargo.lock
Update Cargo.lock on top of commit 7ecd3f71079 ("Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging").
--- rust/Cargo.lock | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
rust/Cargo.lock +1 -2
@@ -172,7 +172,6 @@ dependencies = [ "migration", "qemu_macros", "qom", - "system", "util", ]
@@ -351,7 +350,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dca6411025b24b60bfa7ec1fe1f8e710ac09782dca409ee8237ba74b51295fd" dependencies = [ "serde_core", - "serde_derive", ] [[package]]
@@ -407,6 +405,7 @@ dependencies = [ "bql", "common", "glib-sys", + "hwcore", "migration", "qom", "system-sys",
Signature · 1 line
2.53.0
Quoted 5 lines · Philippe Mathieu-Daudé
Date: Mon, 9 Mar 2026 18:24:40 +0100
From: Philippe Mathieu-Daudé <[email protected]>
Subject: [PATCH] rust: Update Cargo.lock
X-Mailer: git-send-email 2.53.0
Quoted 7 lines
Update Cargo.lock on top of commit
7ecd3f71079("Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging").Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- rust/Cargo.lock | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
When I ran cargo +nightly build, I met this error:
$ cargo +nightly build
Compiling system-sys v0.1.0 (/media/liuzhao/data/qemu-cook/rust/bindings/system-sys)
error[E0432]: unresolved import `hwcore_sys`
--> bindings/system-sys/lib.rs:22:5
|
22 | use hwcore_sys::{qemu_irq, DeviceClass, DeviceState};
| ^^^^^^^^^^ use of unresolved module or unlinked crate `hwcore_sys`
|
= help: if you wanted to use a crate named `hwcore_sys`, use `cargo add hwcore_sys` to add it to your `Cargo.toml`For more information about this error, try rustc --explain E0432.
error: could not compile system-sys (lib) due to 1 previous error
This is because of the wrong dependency relationship in Cargo.toml of hwcore-sys & system-sys.
But the fix for this error will bring a little more change in Cargo.lock (since the dependencies will change).
What about fixing this build bug first before updating Cargo.lock?
(That's a fix for build error I met.) -------------------------------->8------------------------------- From cc96c5530f5fe75eb0a422b092dbb761547e7514 Mon Sep 17 00:00:00 2001
From: Zhao Liu <[email protected]>
Date: Wed, 11 Mar 2026 17:00:51 +0800
Subject: [PATCH] rust: Fix wrong dependencies for cargo
There's a build error:
$ cargo +nightly build
Compiling system-sys v0.1.0 (/media/liuzhao/data/qemu-cook/rust/bindings/system-sys)
error[E0432]: unresolved import `hwcore_sys`
--> bindings/system-sys/lib.rs:22:5
|
22 | use hwcore_sys::{qemu_irq, DeviceClass, DeviceState};
| ^^^^^^^^^^ use of unresolved module or unlinked crate `hwcore_sys`
|
= help: if you wanted to use a crate named `hwcore_sys`, use `cargo add hwcore_sys` to add it to your `Cargo.toml`For more information about this error, try rustc --explain E0432.
error: could not compile system-sys (lib) due to 1 previous error
This is because hwcore-sys & system-sys have the wrong dependencies relationship in their Cargo.toml.
Fix the dependencies of hwcore-sys & system-sys in Cargo.toml, aligning the dependencies described in their meson.build files.
--- rust/bindings/hwcore-sys/Cargo.toml | 1 - rust/bindings/system-sys/Cargo.toml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)
rust/bindings/hwcore-sys/Cargo.toml +0 -1
@@ -21,7 +21,6 @@ chardev-sys = { path = "../chardev-sys" } qom-sys = { path = "../qom-sys" } migration-sys = { path = "../migration-sys" } util-sys = { path = "../util-sys" } -system-sys = { path = "../system-sys" } [lints] workspace = true
rust/bindings/system-sys/Cargo.toml +1 -0
@@ -17,6 +17,7 @@ path = "lib.rs" [dependencies] glib-sys = { workspace = true } common = { path = "../../common" } +hwcore-sys = { path = "../hwcore-sys" } migration-sys = { path = "../migration-sys" } util-sys = { path = "../util-sys" } qom-sys = { path = "../qom-sys" }
--
2.34.1
Paolo Bonzini
AppliedQueued, thanks.
Paolo