Skip to main content

moduvex_runtime/platform/
mod.rs

1//! Platform abstraction layer.
2//!
3//! Selects the appropriate OS-level primitives at compile time and re-exports
4//! them through a unified `sys` surface that the rest of the crate uses.
5//!
6//! Supported targets:
7//! - Linux   → epoll (via `reactor::epoll`)
8//! - macOS   → kqueue (via `reactor::kqueue`)
9//! - FreeBSD → kqueue (via `reactor::kqueue`)
10//! - Windows → IOCP stub (via `reactor::iocp`)
11
12pub mod sys;
13
14// Re-export the most-used types at the platform level so callers can write
15// `platform::RawSource` instead of `platform::sys::RawSource`.
16pub use sys::{close_fd, create_pipe, events_with_capacity, set_nonblocking};
17pub use sys::{Event, Events, Interest, RawSource};