mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-23 06:28:08 +02:00
This is intended to a Rust analog to "src/util", which has
many utilities used by Mesa developers. This is mostly
a copy of ${crosvm} rutabaga_gfx/src/rutabaga_os (which will
be deleted in favor of this crate).
Key constructs include:
- SharedMemory
- MemoryMapping
- Tube (sockets, essentially)
- OwnedDescriptor (HANDLE or fd-based)
- WaitContext (epoll, ..)
As one would expect, Linux implementations are the most complete.
Acked-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
23 lines
635 B
Rust
23 lines
635 B
Rust
// Copyright 2025 Google
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
#[cfg(any(target_os = "android", target_os = "linux"))]
|
|
pub mod linux;
|
|
|
|
#[cfg(any(target_os = "fuchsia", target_os = "macos", target_os = "nto"))]
|
|
pub mod stub;
|
|
|
|
#[cfg(windows)]
|
|
pub mod windows;
|
|
|
|
cfg_if::cfg_if! {
|
|
if #[cfg(any(target_os = "android", target_os = "linux"))] {
|
|
pub use linux as platform;
|
|
} else if #[cfg(windows)] {
|
|
pub use windows as platform;
|
|
} else if #[cfg(any(target_os = "fuchsia", target_os = "macos", target_os = "nto"))] {
|
|
pub use stub as platform;
|
|
} else {
|
|
compile_error!("Unsupported platform");
|
|
}
|
|
}
|