-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
queue-ser: changes for 0.1.0 release
Added changelog, initial readme, and Cargo.toml updates for the initial release of virtio-queue-ser. Signed-off-by: Alexandru Agache <aagch@amazon.com>
- Loading branch information
1 parent
47cabf8
commit fd17757
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# v0.1.0 | ||
|
||
This is the first release of the crate, compatible with version `0.3.x` of `virtio-queue`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# virtio-queue-ser | ||
|
||
This crate is a companion to [virtio-queue](https://crates.io/crates/virtio-queue), | ||
focusing on persistent state representation for use cases such as (de)serialization. | ||
The main abstraction is the `QueueStateSer` object, which can be converted to and | ||
from `QueueState` via the provided `From` trait implementations. `virtio-queue-ser` currently | ||
supports (de)serialization of `QueueStateSer` objects via [serde](https://crates.io/crates/serde) | ||
and [versionize](https://crates.io/crates/versionize). The former always serializes the latest | ||
version of `QueueStateSer`, whereas multiple versions will be supported with `versionize` as | ||
breaking changes are introduced to `QueueState` (and, by extension, `QueueStateSer`). | ||
|
||
On serialization, the typical workflow is to start from a `state: QueueState` object, obtain | ||
the corresponding `QueueStateSer` (i.e. `state_ser = QueueStateSer::from(&state)`), then write | ||
the serialized data using the underlying backend (i.e. `serde` or `versionize`). When deserializing, | ||
we first get a `state_ser: QueueStateSer` object from the backend, and then convert it to a | ||
`QueueState` (for example, `state = QueueState::from(&state_ser)`). | ||
|
||
When a `versionize`-based backend is used, the state transformations required to transition between | ||
versions are transparent to consumers of `virtio-queue-ser`. For example, if an older version of | ||
`QueueStateSer` has been serialized with `versionize`, and we're deserializing based on that data, | ||
then the `QueueStateSer` object obtained via `versionize` will automatically include any changes | ||
required for converting to the current version. | ||
|
||
## License | ||
|
||
This project is licensed under either of | ||
|
||
- [Apache License](http://www.apache.org/licenses/LICENSE-2.0), Version 2.0 | ||
- [BSD-3-Clause License](https://opensource.org/licenses/BSD-3-Clause) |