mesa/src/util/rust/lib.rs
Gurchetan Singh e0b1193361 mesa: import mesa3d_util
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>
2025-06-17 22:28:54 +00:00

33 lines
984 B
Rust

// Copyright 2025 Google
// SPDX-License-Identifier: MIT
mod bytestream;
mod defines;
mod descriptor;
mod error;
mod memory_mapping;
mod shm;
mod sys;
pub use bytestream::Reader;
pub use bytestream::Writer;
pub use defines::*;
pub use descriptor::AsBorrowedDescriptor;
pub use descriptor::AsRawDescriptor;
pub use descriptor::FromRawDescriptor;
pub use descriptor::IntoRawDescriptor;
pub use error::MesaError;
pub use error::MesaResult;
pub use memory_mapping::MemoryMapping;
pub use shm::round_up_to_page_size;
pub use shm::SharedMemory;
pub use sys::platform::descriptor::OwnedDescriptor;
pub use sys::platform::descriptor::RawDescriptor;
pub use sys::platform::descriptor::DEFAULT_RAW_DESCRIPTOR;
pub use sys::platform::event::Event;
pub use sys::platform::pipe::create_pipe;
pub use sys::platform::pipe::ReadPipe;
pub use sys::platform::pipe::WritePipe;
pub use sys::platform::tube::Listener;
pub use sys::platform::tube::Tube;
pub use sys::platform::wait_context::WaitContext;