$ account J-x-Z
Cocoa-Way is a macOS-native Wayland compositor that runs Linux GUI applications inside container runtimes (Apple Container, Docker, OrbStack, or via SSH/Waypipe) and renders them to macOS windows using Metal. The core architecture consists of a Rust binary that serves as both a desktop compositor (single window with tiled layout) and a rootless mode that maps each xdg-toplevel to a native macOS window. It features bidirectional clipboard relay (text and PNG, up to 64 MiB), CoreAudio forwarding, a control API over Unix sockets, and an optional MCP server for AI-assisted diagnostics and onboarding. The project demonstrates high craftsmanship in its Metal renderer with texture caching and damage-coalescing, as well as in its container session management, which handles multiple runtime backends and complex lifecycle orchestration. The codebase is well-structured but contains a few monolithic files (e.g., main.rs, container_mode.rs) that handle a large amount of state and UI logic.