Commit graph

4 commits

Author SHA1 Message Date
Matthew Maurer
8aabb8d9c0 Update to syn-2
Change-Id: I0043acbdcd7a697063931a3505f6e90354f92d2a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5078521
Commit-Queue: Frederick Mayle <fmayle@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2023-12-02 00:23:50 +00:00
Dennis Kempin
1dab58a2cf Update all copyright headers to match new style
This search/replace updates all copyright notices to drop the
"All rights reserved", Use "ChromiumOS" instead of "Chromium OS"
and drops the trailing dots.

This fulfills the request from legal and unifies our notices.

./tools/health-check has been updated to only accept this style.

BUG=b:246579983
TEST=./tools/health-check

Change-Id: I87a80701dc651f1baf4820e5cc42469d7c5f5bf7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3894243
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-09-13 18:41:29 +00:00
Dennis Kempin
4fea399df9 Reformat imports
crosvm is switching the import style to use one import per line.
While more verbose, this will greatly reduce the occurence of merge
conflicts going forward.

Note: This is using a nightly feature of rustfmt. So it's a one-off
re-format only. We are considering adding a nightly toolchain to
enable the feature permanently.

BUG=b:239937122
TEST=CQ

Change-Id: Id2dd4dbdc0adfc4f8f3dd1d09da1daafa2a39992
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3784345
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-07-28 00:15:50 +00:00
Alexandre Courbot
aa043e8c00 add serde_keyvalue crate
Add a crate for deserializing command-line options given as key-values.

This crate leverages serde to deserialize key-value argument strings (a
commonly used pattern in crosvm) into configuration structures. This
will allow us to remove a big part of the manual parsing currently done
in `main.rs`, will provide consistent arguments to the `crosvm run` and
`crosvm device` commands, and results in more precise error reporting.

The use of serde will also allow us to similarly deserialize
configuration structures from configuration files with very little extra
code involved.

As explained in the crate's documentation, its main entry point is a
`from_key_values` function that allows a build a struct implementing
serde's `Deserialize` trait from a key/values string.

In order to integrate transparently with `argh`, there is also a
`FromKeyValue` derive macro that automatically implements `FromArgValue`
for structs deriving from it.

BUG=b:218223240
BUG=b:217480043
TEST=cargo build
TEST=cargo test -p serde_keyvalue

Change-Id: Id6316e40150d5f08a05e6f04e39ecbc73d72dfa0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3439669
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Anton Romanov <romanton@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2022-03-24 01:33:21 +00:00