rust: move dependencies to rust/Cargo.toml

As more crates start using the same dependencies, it's better to not
repeat the versions and move the dependency declarations to the workspace.

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2025-08-22 12:07:44 +02:00
parent 4344b358a8
commit 92dedaf169
2 changed files with 8 additions and 3 deletions

View file

@ -15,6 +15,11 @@ license = "GPL-2.0-or-later"
repository = "https://gitlab.com/qemu-project/qemu/"
rust-version = "1.77.0"
[workspace.dependencies]
anyhow = "~1.0"
foreign = "~0.3.1"
libc = "0.2.162"
[workspace.lints.rust]
unexpected_cfgs = { level = "deny", check-cfg = [
'cfg(MESON)', 'cfg(HAVE_GLIB_WITH_ALIGNED_ALLOC)',

View file

@ -15,9 +15,9 @@ rust-version.workspace = true
[dependencies]
qemu_api_macros = { path = "../qemu-api-macros" }
anyhow = "~1.0"
libc = "0.2.162"
foreign = "~0.3.1"
anyhow = { workspace = true }
foreign = { workspace = true }
libc = { workspace = true }
[features]
default = ["debug_cell"]