From 3698b8e74cd6a2c58fbc1959db79bc4fcf6c0d46 Mon Sep 17 00:00:00 2001 From: Jinank Jain Date: Tue, 1 Apr 2025 08:41:32 +0000 Subject: [PATCH] build: Centralize serde_json crate to workspace `serde_json` crate is referenced by multiple components, centralize it to workspace to better manage this crate. Signed-off-by: Jinank Jain --- Cargo.toml | 7 +++++-- event_monitor/Cargo.toml | 2 +- hypervisor/Cargo.toml | 2 +- net_util/Cargo.toml | 2 +- performance-metrics/Cargo.toml | 2 +- test_infra/Cargo.toml | 2 +- tracer/Cargo.toml | 2 +- virtio-devices/Cargo.toml | 2 +- vm-migration/Cargo.toml | 2 +- vmm/Cargo.toml | 2 +- 10 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index edaece2ed..d93131ee9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ libc = "0.2.167" log = { version = "0.4.22", features = ["std"] } option_parser = { path = "option_parser" } seccompiler = { workspace = true } -serde_json = "1.0.120" +serde_json = { workspace = true } signal-hook = "0.3.17" thiserror = "2.0.6" tpm = { path = "tpm" } @@ -54,7 +54,7 @@ zbus = { version = "4.4.0", optional = true } dirs = "6.0.0" net_util = { path = "net_util" } once_cell = "1.20.2" -serde_json = "1.0.120" +serde_json = { workspace = true } test_infra = { path = "test_infra" } wait-timeout = "0.2.0" @@ -124,3 +124,6 @@ vmm-sys-util = "0.12.1" # igvm crates igvm = "0.3.4" igvm_defs = "0.3.1" + +# serde crates +serde_json = "1.0.120" diff --git a/event_monitor/Cargo.toml b/event_monitor/Cargo.toml index c6f0b1e27..4bc6c9f9e 100644 --- a/event_monitor/Cargo.toml +++ b/event_monitor/Cargo.toml @@ -9,4 +9,4 @@ flume = "0.11.1" libc = "0.2.167" once_cell = "1.20.2" serde = { version = "1.0.208", features = ["derive", "rc"] } -serde_json = "1.0.120" +serde_json = { workspace = true } diff --git a/hypervisor/Cargo.toml b/hypervisor/Cargo.toml index 05fecff96..b4b68bd12 100644 --- a/hypervisor/Cargo.toml +++ b/hypervisor/Cargo.toml @@ -30,7 +30,7 @@ mshv-bindings = { workspace = true, features = [ ], optional = true } mshv-ioctls = { workspace = true, optional = true } serde = { version = "1.0.208", features = ["derive", "rc"] } -serde_json = "1.0.120" +serde_json = { workspace = true } serde_with = { version = "3.9.0", default-features = false, features = [ "macros", ] } diff --git a/net_util/Cargo.toml b/net_util/Cargo.toml index 9333be27e..2294b866b 100644 --- a/net_util/Cargo.toml +++ b/net_util/Cargo.toml @@ -27,4 +27,4 @@ vmm-sys-util = { workspace = true } once_cell = "1.20.2" pnet = "0.35.0" pnet_datalink = "0.35.0" -serde_json = "1.0.120" +serde_json = { workspace = true } diff --git a/performance-metrics/Cargo.toml b/performance-metrics/Cargo.toml index f695c610c..46e184814 100644 --- a/performance-metrics/Cargo.toml +++ b/performance-metrics/Cargo.toml @@ -9,7 +9,7 @@ version = "0.1.0" clap = { version = "4.5.13", features = ["wrap_help"] } dirs = "6.0.0" serde = { version = "1.0.208", features = ["derive", "rc"] } -serde_json = "1.0.120" +serde_json = { workspace = true } test_infra = { path = "../test_infra" } thiserror = "2.0.6" wait-timeout = "0.2.0" diff --git a/test_infra/Cargo.toml b/test_infra/Cargo.toml index c88d54509..199270d60 100644 --- a/test_infra/Cargo.toml +++ b/test_infra/Cargo.toml @@ -10,7 +10,7 @@ epoll = "4.3.3" libc = "0.2.167" once_cell = "1.20.2" serde = { version = "1.0.208", features = ["derive", "rc"] } -serde_json = "1.0.120" +serde_json = { workspace = true } ssh2 = { version = "0.9.4", features = ["vendored-openssl"] } vmm-sys-util = { workspace = true } wait-timeout = "0.2.0" diff --git a/tracer/Cargo.toml b/tracer/Cargo.toml index 5a3983297..c745644f8 100644 --- a/tracer/Cargo.toml +++ b/tracer/Cargo.toml @@ -9,7 +9,7 @@ libc = "0.2.167" log = "0.4.22" once_cell = "1.20.2" serde = { version = "1.0.208", features = ["derive", "rc"] } -serde_json = "1.0.120" +serde_json = { workspace = true } [features] tracing = [] diff --git a/virtio-devices/Cargo.toml b/virtio-devices/Cargo.toml index 3aad50567..59d0970aa 100644 --- a/virtio-devices/Cargo.toml +++ b/virtio-devices/Cargo.toml @@ -24,7 +24,7 @@ pci = { path = "../pci" } rate_limiter = { path = "../rate_limiter" } seccompiler = { workspace = true } serde = { version = "1.0.208", features = ["derive"] } -serde_json = "1.0.120" +serde_json = { workspace = true } serde_with = { version = "3.9.0", default-features = false, features = [ "macros", ] } diff --git a/vm-migration/Cargo.toml b/vm-migration/Cargo.toml index 80be8e847..0bd6dfa42 100644 --- a/vm-migration/Cargo.toml +++ b/vm-migration/Cargo.toml @@ -7,6 +7,6 @@ version = "0.1.0" [dependencies] anyhow = "1.0.94" serde = { version = "1.0.208", features = ["derive", "rc"] } -serde_json = "1.0.120" +serde_json = { workspace = true } thiserror = "2.0.6" vm-memory = { workspace = true, features = ["backend-atomic", "backend-mmap"] } diff --git a/vmm/Cargo.toml b/vmm/Cargo.toml index e9885f1c5..fc3fcfad9 100644 --- a/vmm/Cargo.toml +++ b/vmm/Cargo.toml @@ -63,7 +63,7 @@ range_map_vec = { version = "0.2.0", optional = true } rate_limiter = { path = "../rate_limiter" } seccompiler = { workspace = true } serde = { version = "1.0.208", features = ["derive", "rc"] } -serde_json = "1.0.120" +serde_json = { workspace = true } serial_buffer = { path = "../serial_buffer" } signal-hook = "0.3.17" thiserror = "2.0.6"