mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2026-01-08 20:57:35 +00:00
This commit aims to allow the vhost-user-vsock to support local yaml configuration. It introduces a new parameter '--config <CONFIG>' to allow user to input a yaml configuration during startup and uses config-rs to parse it. Note that the configuration is currently made conflicted to the original input parameters. It introduces a new error -- ConfigParse inside the crates/vsock/src/vhu_vsock.rs to support runtime error handling and the new test_vsock_config_from_file() test. It includes a new README.md with a parameter specification and a config example in the Usage section. It also introduces serde_deserialize(yaml) for VsockParam to let config-rs directly pack the field specified in the array into the VsockParam as suggested in config-rs. The serde crate is added to crates/vsock/Cargo.toml correspondingly. This commit also changes the original #[clap] into #[arg] as suggested in clap-v4. Signed-off-by: Yiyang Wu <toolmanp@outlook.com> |
||
|---|---|---|
| .. | ||
| gpio | ||
| i2c | ||
| rng | ||
| vsock | ||