mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
52b8e42869
Ensure that every Cargo.toml dependency on a third-party crates.io crate specifies at least a major version, or a minor version for 0.x crates, to ensure that if a new major version is published, it cannot cause API breaks. The versions are selected to match the ones already in Cargo.lock, so this should have no functional change, but it will help prevent new "*" versions from being introduced via copy-and-paste. For rationale, see the Cargo FAQ: <https://doc.rust-lang.org/cargo/faq.html#can-libraries-use--as-a-version-for-their-dependencies> `minijail`, `audio_streams`, and `cras` are left as "*" for now, since they have unusual situations (imported from a submodule and/or replaced at build time with ebuild magic). BUG=None TEST=tools/dev_container tools/presubmit TEST=verify Cargo.lock is unchanged Change-Id: Ifa18199f812f01d2d10bfb4146b3353c1a76527c Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5555656 Reviewed-by: Frederick Mayle <fmayle@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
serde_keyvalue_derive | ||
src | ||
Cargo.toml | ||
README.md |
Serde deserializer from key=value strings
A lightweight serde deserializer for strings containing key-value pairs separated by commas, as commonly found in command-line parameters.
Say your program takes a command-line option of the form:
--foo type=bar,active,nb_threads=8
This crate provides a from_key_values
function that deserializes these key-values into a
configuration structure. Since it uses serde, the same configuration structure can also be created
from any other supported source (such as a TOML or YAML configuration file) that uses the same keys.
Integration with the argh command-line parser is also provided via
the argh_derive
feature.
See the inline documentation for examples and more details.