Cargo.toml: configure unexpected_cfgs for cfg(kani) via [lints.rust] Configure check-cfg = ['cfg(kani)'] under [workspace.lints.rust] and inherit it via [lints] workspace = true in member crates, replacing the --check-cfg=cfg(kani) workarounds in .cargo/config.toml, tools/presubmit, and tools/build_release. Because Cargo ignores .cargo/config.toml rustflags and rustdocflags whenever RUSTFLAGS or RUSTDOCFLAGS is set in the environment (such as in tools/build_release, tools/presubmit, or ChromeOS Portage ebuilds), declaring check-cfg in Cargo.toml ensures Cargo always passes --check-cfg=cfg(kani) to rustc and rustdoc across all builds. BUG=b:567081999 Change-Id: I78b0ef5ddc0f2b7e97f8c245867e97ab6a06cd80 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/8478076 Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org> Auto-Submit: Zihan Chen <zihanchen@google.com> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
The ChromeOS Virtual Machine Monitor
crosvm is a secure, lightweight, and performant Virtual Machine Monitor (VMM) written in Rust. Originally developed for ChromeOS to run Linux (Crostini) and Android guests (ARCVM). It is now used across multiple products and platforms such as TerminalApp on Android, Cuttlefish and Windows.
crosvm focuses on security through strong isolation and a modern, memory-safe implementation. It leverages hardware-assisted virtualization to provide a robust execution environment for untrusted code.
io_uring, vhost, and an internal async runtime (cros_async).crosvm implements a wide range of paravirtualized devices via the virtio standard:
virtio-net with optional vhost and slirp backends.virtio-block supporting raw, qcow2, zstd, and Android sparse formats.virtio-gpu with 2D and 3D acceleration (via virglrenderer, gfxstream, or vulkano).virtio-snd with backends for CRAS (ChromeOS), AAudio (Android), and more.virtio-fs and virtio-9p.crosvm is designed with a “process-per-device” model:
forked into its own process.The recommended way to build and develop crosvm is using the provided development container.
Use the dev container to build a release version of crosvm:
./tools/dev_container ./tools/build_release
Follow this example usage to run a simple Linux guest.
#crosvm channel on Matrix.crosvm is an open-source project licensed under the BSD-3-Clause License.