Skip to content

Commit ead2280

Browse files
committed
create vm-superio-ser
This crate provides state objects that add serialization and versionize capabilities to the ones from vm-superio. Signed-off-by: Laura Loghin <lauralg@amazon.com>
1 parent 7110a88 commit ead2280

File tree

8 files changed

+46
-15
lines changed

8 files changed

+46
-15
lines changed

Cargo.toml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
[package]
2-
name = "vm-superio"
3-
version = "0.3.0"
4-
description = "Emulation for legacy devices"
5-
keywords = ["superio", "emulation"]
6-
repository = "https://github.com/rust-vmm/vm-superio"
7-
readme = "README.md"
8-
authors = ["rust-vmm AWS maintainers <rust-vmm-maintainers@amazon.com>"]
9-
license = "Apache-2.0 OR BSD-3-Clause"
10-
edition = "2018"
11-
12-
[dev-dependencies]
13-
libc = ">=0.2.39"
14-
vmm-sys-util = ">=0.7.0"
1+
[workspace]
2+
members = [
3+
"crates/vm-superio",
4+
"crates/vm-superio-ser",
5+
]

crates/vm-superio-ser/Cargo.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[package]
2+
name = "vm-superio-ser"
3+
version = "0.1.0"
4+
description = "Serialization for legacy device states"
5+
keywords = ["superio", "serialization", "versioning"]
6+
repository = "https://github.com/rust-vmm/vm-superio"
7+
readme = "README.md"
8+
authors = ["rust-vmm AWS maintainers <rust-vmm-maintainers@amazon.com>"]
9+
license = "Apache-2.0 OR BSD-3-Clause"
10+
edition = "2018"
11+
12+
[dependencies]
13+
serde = { version = ">=1.0.27", features = ["derive"] }
14+
versionize = ">=0.1.6"
15+
versionize_derive = ">=0.1.3"
16+
vm-superio = { path = "../vm-superio" }

crates/vm-superio-ser/src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
//
3+
// SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause
4+
5+
//! Adds to the state objects from `vm-superio` serialization capabilities.
6+
//!
7+
//! Provides wrappers over the state objects from `vm-superio` crate which
8+
//! implement the `Serialize`, `Deserialize` and `Versionize` traits as well.
9+
10+
#![deny(missing_docs)]

crates/vm-superio/Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "vm-superio"
3+
version = "0.3.0"
4+
description = "Emulation for legacy devices"
5+
keywords = ["superio", "emulation"]
6+
repository = "https://github.com/rust-vmm/vm-superio"
7+
readme = "README.md"
8+
authors = ["rust-vmm AWS maintainers <rust-vmm-maintainers@amazon.com>"]
9+
license = "Apache-2.0 OR BSD-3-Clause"
10+
edition = "2018"
11+
12+
[dev-dependencies]
13+
libc = ">=0.2.39"
14+
vmm-sys-util = ">=0.7.0"
File renamed without changes.
File renamed without changes.

src/rtc_pl031.rs renamed to crates/vm-superio/src/rtc_pl031.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ impl<EV: RtcEvents> Rtc<EV> {
203203

204204
// A struct implementing RtcEvents for tracking the occurrence of
205205
// significant events.
206-
events,
206+
events
207207
}
208208
}
209209

File renamed without changes.

0 commit comments

Comments
 (0)