moirai-pal 0.4.0

Platform Abstraction Layer for Moirai async I/O operations
Documentation

Platform Abstraction Layer (PAL) for Moirai async I/O operations.

This module provides platform-specific implementations of async I/O primitives that enable true non-blocking operations without external runtime dependencies.

Architecture

The PAL provides a unified interface across platforms while leveraging optimal platform-specific async I/O mechanisms:

  • Linux: epoll-based event notification
  • macOS/BSD: kqueue-based event notification
  • Windows: WSAPoll-based socket readiness polling
  • WebAssembly: Web APIs with JavaScript interop

Design Principles

  • Zero External Dependencies: Only platform system libraries
  • Zero-Copy Operations: Direct buffer management
  • Sub-microsecond Latency: Optimized for performance-critical applications
  • Memory Efficiency: Minimal per-operation overhead
  • Cross-Platform Consistency: Uniform behavior across all targets