可可之道 – 原生 macOS Wayland 组合器,用于无缝运行 Linux 应用
Cocoa-Way – Native macOS Wayland compositor for running Linux apps seamlessly

原始链接: https://github.com/J-x-Z/cocoa-way

Cocoa-Way 能够在 macOS 上原生运行 Linux 应用程序,**没有任何虚拟机开销**。它通过 Unix socket 和 `waypipe` 工具,直接使用 macOS 的 Metal/OpenGL 渲染 Wayland 应用程序。这带来了**原生感觉的窗口、HiDPI 支持(Retina 优化)以及精美的 UI 元素**,例如阴影和焦点指示器。 与 XQuartz 或 VNC 等替代方案不同,Cocoa-Way 提供**低延迟和完全集成**,而无需 X11 的复杂性或全屏限制。安装涉及安装依赖项和从源代码构建(或下载 .dmg/.zip)。 该项目是关于使用 Rust 进行高效跨平台 Wayland 虚拟化研究的一部分,并提供了一个脚本 (`run_waypipe.sh`) 来解决潜在的 SSH 连接问题。Cocoa-Way 是开源的 (GPL-3.0) 并且欢迎贡献。

对不起。
相关文章

原文

Demo Video

True protocol portability: Cocoa-Way rendering Linux apps from OrbStack via Unix sockets.

Feature Description
🍎 Native macOS Metal/OpenGL rendering, seamless desktop integration
🚀 Zero VM Overhead Direct Wayland protocol via socket, no virtualization
📺 HiDPI Ready Optimized for Retina displays with proper scaling
🎨 Polished UI Server-side decorations with shadows and focus indicators
Hardware Accelerated Efficient OpenGL rendering pipeline
brew tap J-x-Z/tap
brew install cocoa-way waypipe-darwin

Download the latest .dmg or .zip from Releases.

# Install dependencies
brew install libxkbcommon pixman pkg-config

# Clone and build
git clone https://github.com/J-x-Z/cocoa-way.git
cd cocoa-way
cargo build --release

⚠️ Required: You must install waypipe-darwin to connect Linux apps.

brew tap J-x-Z/tap && brew install waypipe-darwin
  1. Start the compositor:

  2. Connect Linux apps via SSH:

    ./run_waypipe.sh ssh user@linux-host firefox
graph LR
    subgraph macOS
        CW[Cocoa-Way<br/>Compositor]
        WP1[waypipe<br/>client]
    end
    
    subgraph Linux VM/Container
        WP2[waypipe<br/>server]
        APP[Linux App<br/>Firefox, etc]
    end
    
    APP -->|Wayland Protocol| WP2
    WP2 <-->|SSH/Socket| WP1
    WP1 -->|Wayland Protocol| CW
    CW -->|Metal/OpenGL| Display[macOS Display]
Loading
Solution Latency HiDPI Native Integration Setup Complexity
Cocoa-Way ⚡ Low ✅ Native windows 🟢 Easy
XQuartz 🐢 High ⚠️ Partial ⚠️ X11 quirks 🟡 Medium
VNC 🐢 High ❌ Full screen 🟡 Medium
VM GUI 🐢 High ⚠️ Partial ❌ Separate window 🔴 Complex

This project is part of the "Turbo-Charged Protocol Virtualization" research initiative exploring zero-cost cross-platform Wayland via Rust trait monomorphization + SIMD-accelerated pixel conversion.

SSH: "remote port forwarding failed"

A stale socket file exists on the remote host. Our run_waypipe.sh script handles this automatically with -o StreamLocalBindUnlink=yes.

If running manually:

waypipe ssh -o StreamLocalBindUnlink=yes user@host ...

Contributions welcome! Please open an issue first to discuss major changes.

GPL-3.0 - Copyright (c) 2024-2025 J-x-Z

联系我们 contact @ memedata.com