On Linux the Vulkan platform is the library's only one, yet reims-vgpu and
reims-vgpu-c refused to build without their `vulkan` features (a
compile_error!), and the code behind it did not compile either: a
default-feature Linux build of the package failed. A crate that does not
build in a feature setting is a failure, so the platform is now unconditional
on Linux.
- reims-vgpu's new build script sets `cfg(vulkan_platform)` on Linux, and on
macOS with the `vulkan` feature, declared for check-cfg. Every
`feature = "vulkan"` gate in the crate is that cfg; the gates of "macOS or
the feature", true on every target the library builds for, are gone.
- The Vulkan platform's dependencies are not optional on Linux; on macOS they
stay the feature's, optional, so the Mac's default build is as before.
- reims-vgpu-c makes every handle on VulkanPlatform on Linux whatever its
features; the compile_error!s go.
Behaviour is unchanged on both OSes: on macOS every cfg answers as the
feature did, and on Linux as the builds with the feature did. The docs and
comments that said Linux needs the feature say it no longer does.
The guest's kext and option ROM are built in parallel and need the device's
wire format before the host side exists: its registers, the region's layout,
the rings' header and the control commands and events of the design's stage
2 wire protocol. They live in a new crate, reims-graphics, which will hold the
device's host side too, and cbindgen writes them into
include/reims_graphics_wire.h, which cargo xtask header --check keeps equal
to its output, as it does reims_vgpu.h.
Two fixes to the design's tables: a control ring's byte ring is 32 KiB, the
largest power of two after its 256-byte header in its 64 KiB (64 KiB less the
header is no power of two), and a pad's header is its type and size alone,
since the bytes left before a ring's end may be 8. A u64 that would follow a
u32 at an offset not a multiple of 8 has a reserved u32 before it, so C and
Rust lay the records out alike.
kache 2 seeds a worktree's incremental state from another worktree's only
when both targets sit inside their worktrees: it maps the compiler's working
directory to one path, and a target elsewhere puts a path of its own in the
compiler's arguments. Measured on the M3 Max: with targets inside the
worktrees, a second worktree's first edit of core compiled in 4.3 s from the
first's state, against 7.0 s with no donor; with each target in its own
directory under ~/.cache, the seed identities differed and it took 5.7 s.
So a worktree, which lives under ~/.cache, now builds in its own target/
with no CARGO_TARGET_DIR. Also rewraps a line of the previous commit.
The owner asked for Rust's incremental cache and kache 2.0.0's. dev-env.sh
no longer sets CARGO_INCREMENTAL=0 or KACHE_ADAPTIVE_INCREMENTAL=0, and unsets
both where a shell kept them, and `cargo xtask check` runs its cargo steps in
the environment it starts in, so a check run again after a fix rebuilds what
the fix changed. Each host's kache configuration turns on adaptive and seeded
incremental state: kache compiles a unit being edited incrementally, and a
new worktree's first incremental compile of it imports a compatible one's
state (rustc 1.98 or later). docs/development.md says how, and that kache 2
compiles through its daemon, which builds now start.
scripts/ mixed the one script a person installing reims-ctl runs,
install-ctl.sh, with eight that only developing the project runs: the worktree
and build environment, the GPU locks, the VM boot and tour drivers, the window
walk and the IOSurface qtest. Those move to scripts/internal, so scripts/ holds
what users run. run_vmapple.sh, walk_window_macos.sh and vm_drive.py find the
repository from their own path, one level deeper now; every reference in the
docs, the Makefile, the video crates' tools and the code's comments follows.
Each worktree's check compiled everything again with full debuginfo and
incremental caches no rebuild used. The dev profile keeps line tables for
the workspace and none for its dependencies, the check builds without
incremental caches, and builds go through kache where it is installed, so
a worktree's first build reuses what another tree built, build scripts
included. Tests read the tree's paths at run time, so a build is the same
in every tree.
scripts/new-worktree.sh makes a worktree from clones of the main checkout's
suite files, and AGENTS.md says a profiling run removes its traces.
Source: 53a4a8edd b568f382e 0c7a0eabc 72c24f74b 10051ba78 8f415697a 73d557f71
bde4220b6 46c7c6b23
A new x86-64 VM needed an OpenCore image and an installer made by hand with
OSX-KVM or ULTMOS. reims-ctl now runs reims-util for both: pick a macOS
version (n in the interface, create --macos on the command line) and it
downloads the installer from Apple, makes the VM's OpenCore image with OVMF
and a Mac identity of its own, and makes the disk.
- create --macos VERSION downloads Apple's recovery image (about 1 GB), or
with --offline an installer of one release (13 to 20 GB). Installers are
kept in the data directory's installers for the next VM, one reims-util at
a time writes there, and a stopped download continues. The download comes
before the VM's directory, so stopping it leaves no VM half made, and
reims-util ends with reims-ctl on Linux. What create is given (a disk, an
installer, an OpenCore image and the OVMF beside it, reims-util itself) is
checked before the download and the disk's copy, and the VM list is read
again before the VM joins it, so VMs made or deleted during a download
stay as they are.
- --opencore is optional: without it reims-util makes the image, with the
VM's MAC as its ROM, and an iMacPro1,1 for macOS 10.13 and 10.14. An image
of the user's brings OVMF_CODE.fd and OVMF_VARS.fd beside it, as
reims-util writes them.
- The interface's form asks where macOS comes from, the version first; with
no name, the VM takes the version's, skipping names a VM or a leftover
directory has. A VM with an installer says in its details, and create
prints, how to install macOS from it; one made from a disk is reminded to
set Metal's error mode.
- A new disk needs an installer or a download: a VM of an empty disk and no
installer is refused.
- Every installer attaches as a read-only disk (snapshot=on), a DMG
converted to a raw image in the VM's directory, so the CD drive is gone: a
change of installer applies at the next start. vm.toml's installer_kind
is no longer written, and is ignored where an older vm.toml has it. A
missing installer says how to eject it.
- reims-ctl __record-install, which scripts/install-ctl.sh runs last,
installs reims-util at the commit reims_util.rs pins, so the update that
brings this reims-ctl installs it too, though it runs the script it
started with. doctor checks for it in place of the system's OVMF, and the
install no longer adds the ovmf or edk2-ovmf package.
- vm.max_map_count: a new VM's default of up to 16 GiB needs about 1.13
million mappings, more than the 1048576 suggested (CachyOS's stock
value). The README, the install script, doctor and the start warning
suggest 2097152, which covers 30 GiB, and check against what the VM, the
largest VM or a new one's default needs.
- Updating from the interface while a create runs says the restart stops
it, as quitting does.
Dropped, as reims-util's images leave nothing for them to cover:
- create --from-script and the interface's launch-script import, which read
OSX-KVM's and ULTMOS's QEMU scripts. A VM made from one keeps working; its
vm.toml names its own copies.
- The search for OVMF beside a user's OpenCore image in those projects'
layouts, QEMU's edk2 build and the distributions' packages, and
--firmware-code and --firmware-vars.
- create --disk-mode overlay: copy, a reflink where the file system can, or
in-place covers an existing disk. A VM made with an overlay keeps working.
- --cpu-model and --cpu-flags on create and set, and the edit form's CPU
fields: new VMs take Skylake-Client-noTSX-IBRS. vm.toml keeps cpu_model
and cpu_flags, so an older VM keeps its model; docs/qemu.md says how to
change it there.
- --installer's --iso and --cdrom aliases.
README, the help and the docs no longer point at OSX-KVM or ULTMOS. README
step 3 describes reims-util's OpenCore picker (5 seconds, which an arrow key
stops, measured on homelab-ms01), and architecture.md 11.4 counts its image
among those that keep AvoidRuntimeDefrag on.
The README now speaks to people running VMs through reims-ctl. The repository
layout, the tests and the Rust library's crates, commands, profiles and
features move to docs/development.md, which the README's Developing section,
AGENTS.md and the docs that cited those sections now point to. The QEMU and VM
section is gone (docs/qemu.md covers it), as are History, whose tags AGENTS.md
now names itself, and the interoperability note under Legal.