1# Features 2 3These features can be enabled using cargo's `--features` flag. Refer to the top-level `Cargo.toml` 4file to see which features are enabled by default. 5 6## `audio` 7 8Enables experimental audio input/ouput to the host. Requires some Chrome OS specific dependencies 9and daemons currently. 10 11## `chromeos` 12 13This option enables features specific to a Chrome OS environment. Examples of that are usage of 14non-upstream kernel security features in the Chrome OS kernel, which should be temporary until 15upstream catches up. Another example would be code to use Chrome OS system daemons like the low 16memory notifier. 17 18These features exist because crosvm was historically a Chrome OS only project, but crosvm is 19intended to be OS agnostic now. If Chrome OS specific code is identified, it should be conditionally 20compiled in using this feature. 21 22## `composite-disk` 23 24Enables the composite-disk format, which adds protobufs as a dependency of the build. This format is 25intended to speed up crosvm's usage in CI environments that might otherwise have to concatenate 26large file system images into a single disk image. 27 28## `default-no-sandbox` 29 30This feature is useful only in testing so that the `--disable-sandbox` flag doesn't need to be 31passed to crosvm every invocation. It is not secure to deploy crosvm with this flag. 32 33## `direct` 34 35Enables a set of features to passthrough devices to the guest via VFIO. 36 37## `gdb` 38 39Enables using gdb to debug the guest kernel. 40 41## `gfxstream` 42 43Enables 3D acceleration for guest via the `gfxstream` protocol over virtio-gpu. This is used for 44compatibility with the Android Emulator. The protocol provides the best speed and compatibility with 45GL/vulkan versions by forwarding the guest's calls to the host's graphics libraries and GPU. 46However, this means the sandbox is not enabled for the virtio-gpu device. 47 48## `gpu` 49 50Enables basic virtio-gpu support. This includes basic display and input features, but lacks 3D 51acceleration in the absence of other crosvm features. 52 53## `plugin` 54 55Enables the plugin mode of crosvm. The plugin mode delegates almost all device emulation to a 56sandboxed child process. Unless you know what you're doing, you almost certainly don't need this 57feature. 58 59## `power-monitor-powerd` 60 61Enables emulation of a battery using the host's power information provided by 62[powerd](https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/power_manager/README.md). 63 64## `tpm` 65 66Enables trusted platform module emulation for the guest. This relies on the software emulated vTPM 67implementation from `libtpm2` which is suited only for testing purposes. 68 69## `usb` 70 71Enables USB host device passthrough via an emulated XHCI controller. 72 73## `video-decoder`/`video-encoder` 74 75Enables the unstable virtio video encoder or decoder devices. 76 77## `virgl_renderer`/`virgl_renderer_next` 78 79Enables 3D acceleration for the guest via the `virglrenderer` library over virtio-gpu. The 80`virgl_renderer_next` variant is used to enable in development features of `virglrenderer` to 81support newer OpenGL versions. 82 83## `wl` 84 85Enables the non-upstream virtio wayland protocol. This can be used in conjuction with the `gpu` 86feature to enable a zero-copy display pipeline. 87 88## `x` 89 90Enables the usage of the X11 protocol for display on the host. 91