crosvm/rutabaga_gfx/Cargo.toml
Gurchetan Singh 61ee6744f2 rutabaga_gfx: nuke base dependency
The base crate has some nifty abstractions but also
pulls in things like minijail, audio_streams and
various random items.

This prevents true cross-platform interoperatibility,
which requires the ability to upload to crates.io
with relative ease.

This change removes the base crate.  The replacement
strategy is two fold:

- For things like SafeDescriptor which don't have
  adequate solutions on crates.io, just copy it
  internally.  I think SafeDescriptor in particular --
  since it works on bot Windows/Linux should probably
  be made into a separate crate long-term since it is
  generically valuable.  Similarly for the Event and
  WaitContext APIs.  For now, live with the duplication.

- Otherwise, the nix crate does most of the Linux
  specific items.

The cross-domain context type has a lot of dependencies
on Linux sockets / epoll.  This is refactored to look more
like the Fuchsia solution, which uses std::sync::mspc
channels to connect to an utility Wayland FIDL library.

The rest of Rutabaga mostly relies just on SafeDescriptor
and the ability to clone it.  rutabaga_gralloc allows
provides shared memory used via virtwl.

Another thing to call out is zerocopy is now strongly
versioned to the latest stable release on crates.io

I also got rid of #[cfg(feature = "virgl_renderer_next")]
on the renderer server fd, since it was complicating the
refactoring.  SafeDescriptor works everywhere and adding
the #ifdef should be reserved for the lowest-levels of
platform specific code when possible.

Overall, this makes compiling on Fuchsia hosts much
simpler.

BUG=b:273555494
TEST= - run cross_domain context type, see Wayland apps
      - note there is a previous bug in cross domain
        when resizing windows, it occurs before this CL.
        The reason seems to be raciness and can likely be fixed
        gfxstream-like seqno.
      - run gfxstream + virgl on Linux, verify everything works.

Change-Id: I7519f2b8ed0cd57c47980d4e76403057498cf064
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4353700
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
2023-03-27 18:46:22 +00:00

42 lines
1.1 KiB
TOML

[package]
name = "rutabaga_gfx"
version = "0.1.1-alpha.1"
authors = ["The ChromiumOS Authors + Android Open Source Project"]
edition = "2021"
description = "[highly unstable] Handling virtio-gpu protocols"
license-file = "LICENSE"
[features]
gfxstream = []
gfxstream_stub = []
virgl_renderer = []
virgl_renderer_next = []
minigbm = []
# To try out Vulkano, delete the following line and uncomment the line in "dependencies". Vulkano
# features are just a prototype and not integrated yet into the ChromeOS build system.
vulkano = []
x = []
[dependencies]
cfg-if = "1.0.0"
data_model = { path = "../common/data_model", version = "0.1.1-alpha.1"}
libc = "0.2.116"
remain = "0.2"
thiserror = "1.0.23"
serde = { version = "1", features = [ "derive" ] }
zerocopy = "0.6"
log = "0.4"
[target.'cfg(unix)'.dependencies]
nix = "0.26.1"
[target.'cfg(windows)'.dependencies]
winapi = "0.3"
# To build latest Vulkano, change version to git = "https:/github.com/vulkano-rs/vulkano.git"
# vulkano = { version = "0.31.0", optional = true }
[build-dependencies]
pkg-config = "0.3"
anyhow = "1.0.57"