since the RegisteredEvent model is effectively an external API, switch
to using protobuf as a more formal/stable means of communicating
messages. also introduces exporting the registered_events.proto file as
part of crosvm_control build, alongside the currently existing header
file.
this patch also introduces feature-gating for registered_events and
protos so as not to bring in too many third party dependencies for a
base build.
BUG=b/278117550
TEST=run bzImage locally
TEST=sidecar program available at https://x20.corp.google.com/users/dr/drmasquatch/socket-pinger-proto
Change-Id: I5d91d87f7807effc125352caf5c75eee2593f70d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4521604
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: maciek swiech <drmasquatch@google.com>
SwapStatus, SwapState, SwapStateTransition, SwapMetrics are directly
contained into crosvm_control.h
SwapState is translated as C++ enum.
SwapStateTransition::time_ms is now u64 because u128 does not support
repr(C).
Changed usize in the structs to u64 because usize is translated as
uintptr_t.
BUG=b:265386761
TEST=cargo build -p crosvm_control
Change-Id: Ia9df56d40c1884067a712620e0fc797e07af77a2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4486549
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: David Stevens <stevensd@chromium.org>
Commit-Queue: Shin Kawamura <kawasin@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
These lines were originally inserted as a workaround, but now that the
`rerun-if-env-changed` lines being emitted by this build.rs have been
found, this workaround has been promoted to a bugfix. :)
build.rs is implicitly `rerun-if-changed`, so that bit can be removed.
BUG=b:275376804
TEST=CQ
Change-Id: I480c33f52fc27252263adb297b65d913f78a3030
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4402291
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Auto-Submit: George Burgess <gbiv@chromium.org>
These are a workaround for b/275376804.
BUG=b:275376804
TEST=Built with these. Changes to src/lib.rs cause build.rs to run.
Change-Id: I89d1f340fd53a90d9ed327517c52c85f86565426
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4385870
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: George Burgess <gbiv@chromium.org>
Adds a build time compilation check for the generated crosvm_control.h
BUG=b:271789981
TEST=CQ, apply crrev/4237140 and observe build failure due to C compile
error
Change-Id: I57867894a975aa0a48f989051bb4243bf97f57e8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4333206
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Kameron Lutes <kalutes@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
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>
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>
This will fix GitHub Action's failure.
This couldn't be caught in kokoro because kokoro sets correct
environment variables for testing.
BUG=none
TEST=./tools/cargo-doc
Change-Id: I1db2e459422e755f6231cb0a6e5e082ffa0727ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3581449
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Kameron Lutes <kalutes@chromium.org>
CARGO_TARGET_DIR is not meant to be used in build scripts as that is an
optional variable that *may* be passed to cargo. The one that is set by
cargo itself is OUT_DIR and is always present to specify where build
scripts are expected to place output
BUG=none
TEST=cq
Change-Id: I118eebf914dbefd93f2cafb6950c7a6b4c01c574
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3598239
Auto-Submit: Anton Romanov <romanton@google.com>
Reviewed-by: Kameron Lutes <kalutes@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Anton Romanov <romanton@google.com>
Generates a C header for the crosvm_control library during crosvm build.
BUG=b:188858559
TEST=cq
Cq-Depend: chromium:3553666
Change-Id: Ic6d57d654f546a4ddf9facad16d29a03c103ebbe
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3553761
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Kameron Lutes <kalutes@chromium.org>