mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-10-23 04:46:29 +00:00
61ee6744f2
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> |
||
---|---|---|
.. | ||
ffi | ||
src | ||
build.rs | ||
Cargo.toml | ||
LICENSE |