📝 Say the library's hosts are Linux, Windows and macOS [ci skip]
The owner's word (Telegram 1924, relayed by metal2vulkan): the hosts are Linux, Windows and macOS, and on macOS the library runs on Vulkan, not Metal. README and the crates' and docs' notes said VMs run on Linux and that the Mac build was for development and tests. They now say x86-64 guests run on Linux and Windows hosts and arm64 guests on Apple silicon Macs, and that the Vulkan platform runs natively on Linux and Windows and over MoltenVK on macOS. rust-toolchain.toml names Windows' target as shipping too, and a reims-ctl test's note says the test, not the installer, is Linux-only. AGENTS.md waits for the owner's own word.
This commit is contained in:
1 parent
7d699fabea
commit
5d38c7e825
11 files changed
+26
-25
No files matched your search
@@ -5,10 +5,10 @@
|
||||
> **Beta.** reims-vgpu has largely stabilized. We're now working through differences between
|
||||
> platforms and GPU drivers, so how well it runs can still depend on your host and its GPU.
|
||||
|
||||
reims-vgpu is a virtual GPU for macOS VMs. It gives x86-64 macOS running in QEMU on Linux
|
||||
accelerated graphics, on your GPU's Vulkan driver. The guest drives it with macOS drivers of our
|
||||
own, which `reims-ctl` puts in the VM's OpenCore image, so there's nothing to install in the guest
|
||||
yourself.
|
||||
reims-vgpu is a virtual GPU for macOS VMs. It gives x86-64 macOS running in QEMU on Linux or
|
||||
Windows accelerated graphics, on your GPU's Vulkan driver. The guest drives it with macOS drivers
|
||||
of our own, which `reims-ctl` puts in the VM's OpenCore image, so there's nothing to install in the
|
||||
guest yourself.
|
||||
|
||||
Alongside the GPU, we ship a QEMU build that uses it, and `reims-ctl`, a small tool that creates
|
||||
and runs macOS VMs for you.
|
||||
@@ -197,8 +197,9 @@ The reims-graphics device (PCI `1234:5247`) and everything on both sides of it a
|
||||
guest, our kexts drive the device, and our Metal bundle turns macOS's Metal calls into the
|
||||
device's command stream. On the host, QEMU's `reims-graphics-pci` hands that stream to the
|
||||
library, which runs it on Vulkan through [`metal2vulkan`](https://github.com/steelbrain/metal2vulkan)
|
||||
and draws the guest's display into a window of its own. The library also builds on a Mac, over
|
||||
MoltenVK, for development and tests, and the guest's side is built there; VMs run on Linux.
|
||||
and draws the guest's display into a window of its own. On a Mac the library runs on Vulkan too,
|
||||
over MoltenVK rather than Metal, and the guest's side is built there. x86-64 VMs run on Linux and
|
||||
Windows hosts, and arm64 VMs on Apple silicon Macs ([docs/qemu.md](docs/qemu.md), "arm64 guests").
|
||||
|
||||
The library's C API (`crates/reims-vgpu-c/include/reims_vgpu.h`, specified in
|
||||
[docs/api.md](docs/api.md)) is its interface to QEMU: `cargo xtask dist` writes the library, the
|
||||
|
||||
@@ -215,8 +215,8 @@ mod tests {
|
||||
|
||||
/// The installer's prune keeps a build older than the newest three while a QEMU runs from
|
||||
/// it, started as reims-ctl starts it, through `qemu/current`, which a newer build then
|
||||
/// took; and removes the old builds nothing runs. The installer runs on Linux alone, whose
|
||||
/// /proc names each process's executable.
|
||||
/// took; and removes the old builds nothing runs. The test runs on Linux alone, whose /proc
|
||||
/// names each process's executable.
|
||||
#[cfg(target_os = "linux")]
|
||||
#[test]
|
||||
fn the_installers_prune_keeps_a_build_a_running_qemu_executes() {
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
//! - every struct the host writes starts with `struct_size` ([`sized`]);
|
||||
//! - every callback table has one `ctx` and one `destroy` ([`table`]).
|
||||
//!
|
||||
//! The exports are made over [`Plat`]: `VulkanPlatform`, natively on Linux and over MoltenVK on
|
||||
//! macOS (a build for development and tests); and core's testkit platform in this crate's unit
|
||||
//! tests, which then run the product's code.
|
||||
//! The exports are made over [`Plat`]: `VulkanPlatform`, natively on Linux and Windows and over
|
||||
//! MoltenVK on macOS; and core's testkit platform in this crate's unit tests, which then run the
|
||||
//! product's code.
|
||||
|
||||
// On the Vulkan platform, a debug build's proof that the runtime's types are `Send` and `Sync`
|
||||
// nests deeper than rustc's default limit of 128 (E0275).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! The `Platform` implementation over `metal2vulkan-runtime`, a Metal-shaped API on Vulkan
|
||||
//! (architecture D1): the library's only platform, natively on Linux, and over MoltenVK on macOS,
|
||||
//! a build for development and tests.
|
||||
//! (architecture D1): the library's only platform, natively on Linux and Windows, and over MoltenVK
|
||||
//! on macOS.
|
||||
//!
|
||||
//! - **Core** ([`core`]): what the reims-graphics device and its platform share,
|
||||
//! generic over one `P: Platform`: the platform traits, the runtime, raises and deaths, the
|
||||
|
||||
@@ -38,8 +38,8 @@ log.workspace = true
|
||||
# it cross threads.
|
||||
parking_lot = { workspace = true, features = ["arc_lock", "send_guard"] }
|
||||
|
||||
# The Vulkan platform (architecture 2.2), the library's only one: natively on Linux, and over
|
||||
# MoltenVK on macOS, a build for development and tests.
|
||||
# The Vulkan platform (architecture 2.2), the library's only one: natively on Linux and Windows,
|
||||
# and over MoltenVK on macOS.
|
||||
reims-vgpu-vulkan.workspace = true
|
||||
metal2vulkan-runtime.workspace = true
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
//! A device is made from one config ([`GraphicsConfig`]) holding closures for its callbacks, and
|
||||
//! answers a [`Result`] with what refused it ([`Error`]). It is generic over the platform with
|
||||
//! [`DefaultPlatform`] as the default, so its forwarding is unit-tested on core's fake platform.
|
||||
//! The platform is the Vulkan platform, `VulkanPlatform`, over metal2vulkan's runtime, on Linux
|
||||
//! natively and on macOS over MoltenVK (a build for development and tests); it draws the device's
|
||||
//! The platform is the Vulkan platform, `VulkanPlatform`, over metal2vulkan's runtime, natively on
|
||||
//! Linux and Windows and on macOS over MoltenVK; it draws the device's
|
||||
//! window into a swapchain of its window, on macOS one over the window's `CAMetalLayer`.
|
||||
//!
|
||||
//! The library logs through the `log` crate: a Rust host installs its own logger.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ library's `reims-vgpu.ui` on Linux and Windows.
|
||||
| layer | crate | what it is |
|
||||
|---|---|---|
|
||||
| core | `reims-vgpu-vulkan`'s `core` | the platform traits, the runtime (threads, queues, holds), raises and deaths, the display's present pipeline, guest memory and the fake platform the tests run on |
|
||||
| platform | `reims-vgpu-vulkan` | core's `Platform`: `VulkanPlatform`, over metal2vulkan's runtime, on Linux, and on macOS over MoltenVK, a build for development and tests |
|
||||
| platform | `reims-vgpu-vulkan` | core's `Platform`: `VulkanPlatform`, over metal2vulkan's runtime, natively on Linux and Windows, and on macOS over MoltenVK |
|
||||
| window | `reims-vgpu-window` | a display's own window (AppKit's or SDL3's on macOS, SDL3's on Linux and Windows), its input and the host's screens; it knows nothing of devices |
|
||||
| device | `reims-vgpu-graphics` | the wire: the records, rings and registers the guest and the host share, and the C header the guest's kexts and the option ROM compile |
|
||||
| Rust API | `reims-vgpu` | the graphics device over the platform: its rings, decoder, display and window, and owned Rust types for its config and callbacks |
|
||||
|
||||
@@ -147,8 +147,8 @@ reims-vgpu-graphics, reims-vgpu-video-* <- reims-vgpu <- reims-vgpu-c <- Q
|
||||
|
||||
- **The Vulkan platform** (`reims-vgpu-vulkan`) is the library's `Platform`, over
|
||||
`metal2vulkan-runtime`, the Metal-shaped API on Vulkan of metal2vulkan, at the commit of its
|
||||
public repository `Cargo.toml` names, on the host's Vulkan driver, or MoltenVK on a Mac (a build
|
||||
for development and tests). Its OS services are its own: on macOS over the system's (`os/macos/`:
|
||||
public repository `Cargo.toml` names, on the host's Vulkan driver, or MoltenVK on a Mac. Its OS
|
||||
services are its own: on macOS over the system's (`os/macos/`:
|
||||
Mach VM, the clock, threads, the autorelease pool, and the message layer, 4.6); on Linux
|
||||
`os/linux/` (a host VM over `mmap` of the guest RAM's files, and the GPU's copies of a video
|
||||
driver's planes in dma-bufs into a runtime buffer). It compiles the library's shaders (4.7). Where its answer differs from Metal's it logs the difference and goes on, and dies
|
||||
|
||||
+3
-3
@@ -4,9 +4,9 @@
|
||||
# The crates' `rust-version` (Cargo.toml) stays the stable floor clippy's `incompatible_msrv` checks
|
||||
# the standard library's items against. D32: the Metal platform is aarch64-apple-darwin alone; the
|
||||
# Vulkan platform builds for aarch64 and x86-64, on macOS and Linux, and x86_64-unknown-linux-gnu is
|
||||
# what ships on Linux (built there, type-checked from the Mac by `cargo xtask check`).
|
||||
# x86_64-pc-windows-gnullvm is the Windows the library is being brought up on (built there under
|
||||
# MSYS2 CLANG64, type-checked from the Mac and Linux by `cargo xtask check`).
|
||||
# what ships on Linux (built there, type-checked from the Mac by `cargo xtask check`),
|
||||
# x86_64-pc-windows-gnullvm what ships on Windows (built there under MSYS2 CLANG64, type-checked
|
||||
# from the Mac and Linux by `cargo xtask check`), and aarch64-apple-darwin what runs on a Mac.
|
||||
# x86_64-apple-darwin runs core's tests under Rosetta, with the x86-64 guest's pages and
|
||||
# instructions, on a Mac that has Rosetta (check skips them on one without).
|
||||
# No Rust binary is arm64e: rustc's arm64e-apple-darwin target has no pointer authentication, and
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
//! compiles the Vulkan crate again.
|
||||
//!
|
||||
//! The library is built on the Vulkan platform (architecture 2.2), its only one: natively on
|
||||
//! Linux, and over MoltenVK on macOS, a build for development and tests. `--platform vulkan`
|
||||
//! Linux and Windows, and over MoltenVK on macOS. `--platform vulkan`
|
||||
//! names it, for the builds that pass it; any other platform is refused.
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
//! `cargo xtask dist` on macOS: the library for arm64 macOS [`DEPLOYMENT_TARGET`], on the Vulkan
|
||||
//! platform over MoltenVK, a build for development and tests. The dylib's install name is
|
||||
//! platform over MoltenVK. The dylib's install name is
|
||||
//! `@rpath/libreims_vgpu.dylib`, and it is signed ad hoc again after the name changes, both on a
|
||||
//! copy under the target dir that is then installed, so a dylib whose bytes come out the same is
|
||||
//! left as it was. `Libs.private` names every library the dylib links (`otool -L`).
|
||||
|
||||
Reference in new issue
Block a user