Commit Graph
5 Commits
Author SHA1 Message Date
Anees Iqbal c57be5bf1e 🐛 Link the Mac's test libraries beside each binary nextest lists
0ba60a07dc linked Homebrew's Vulkan loader and KosmicKrisp in
<target>/debug/lib, ../lib from <target>/debug/deps. Under the pinned
nightly's build-dir layout no deps directory is made: each test binary is
<target>/.../build/<crate>/<hash>/out/<bin>, whose ../lib is
build/<crate>/<hash>/lib, so the links served no test (batch 329's Mac leg,
m3-max-58423, had no deps directory at all).

The check now asks nextest where the binaries are: cargo nextest list with
the run's own arguments, which builds them, lists each binary's path
(binary-path, --list-type binaries-only, JSON), and the loader and
KosmicKrisp are linked in ../lib from each binary's directory before the
run. That holds under either layout. A file Homebrew lacks is named and
not linked, as before. A list that fails, or that names no binary, fails
the check.

tools.rs's reader of cargo metadata's target_directory becomes json_strings,
every string value of a key, which reads nextest's list too. The test that
pinned the Makefile lines goes: the check no longer runs make for this. The
new tests read a list and lay out the directories of both layouts.
2026-11-20 06:03:27 -08:00
Anees Iqbal 4ba8eb34f2 🆕 Write the library's dist tree on Windows, its archive renamed
`cargo xtask dist` refused on Windows. Run in MSYS2's CLANG64 environment, it
now builds reims-vgpu-c for x86_64-pc-windows-gnullvm, the MinGW target whose
archive QEMU's Windows build links, and writes the tree as on Linux: the
archive, lib/libreims_vgpu.dll, the header, and reims-vgpu.pc, whose
Libs.private is rustc's native-static-libs note for the target.

The archive bundles SDL3, whose 3203 SDL_* globals a host's own SDL (QEMU's
-display sdl, SDL 2) would bind to. Linux links the objects into one and makes
every global but the C API's local; COFF has no such link: lld makes no
relocatable object, and GNU ld -r resolves the objects' COMDAT sections into
static symbols in section 0 that lld refuses ("GCC_except_table36 should not
refer to special section 0"), after writing a plain COFF object of 156110
sections that no tool read until given --oformat pe-bigobj-x86-64. So the
objects stay as built, and llvm-objcopy --redefine-syms gives every global they
define but the rvg_* functions the suffix .rvg, with its __imp_ name, in every
object: no C name of a host's is one of them, and each reference in the archive
binds where it did. rustc's 1832 raw-dylib import members stay as built. dist
fails where the objects keep another global.

The DLL is linked from the archive with a module-definition file that exports
the rvg_* functions alone, and not --whole-archive, which would define each
crate's import descriptor of a DLL again. No import library is installed, so
-lreims_vgpu and meson's static lookup take the archive. What Linux and Windows
share (rustc's note, nm's listing, the C API's names and the globals check)
moves from linux.rs to dist/archive.rs.
2026-11-15 08:39:56 -08:00
Anees Iqbal 3b2b1ad910 🎨 Build xtask on Windows, with dist refused there
xtask did not build for Windows: dist picked an OS module only on Linux
and macOS, and replace_if_changed and its tests set and read Unix modes.
cargo xtask is how a Windows host will run the checks, so it builds there
now:

- dist/windows.rs makes no tree. Its dist refuses, building and writing
  nothing, until a dist tree is laid out for Windows (the static archive's
  symbol localization there is still open).
- replace_if_changed sets the mode on Unix only, since Windows keeps no mode
  bits. The tests' mode reads and the symlink case run on Unix only.
- The helpers that only the Unix dists call expect dead_code on Windows, so
  the expectation fails once a Windows dist uses them.

Linux and macOS run the same code as before.
2026-11-15 05:50:53 -08:00
Anees Iqbal 3db95eb188 🔥 Cut the C API down to the reims-graphics device
QEMU keeps only reims-graphics-pci.c's calls once apple-gfx goes: the ten
rvg_graphics_device_* functions, rvg_status_message, the window's and the
cursor's types and the memory map the device's config names. Everything of
Apple's paravirt device goes from the header: the device, its displays and
frames, the IOSurface, video and scaler devices, trace ranges, the log hook,
the dirty source, suspend and resume, and their status codes, pins and the
xtask smoke that drove them.

The C API is no longer additive-only: the status codes are renumbered to the
five the graphics calls return, rvg_status_message keeping a message for each,
and the struct versions the paravirt hosts needed go, so a struct_size below
the library's is refused. The window config keeps its mode, the one field the
graphics device reads; the cursor and memory-map types move beside the
graphics device. rvg_graphics_device_mmio_write goes too, QEMU calling only
the taking write, which now carries the plain write's contract.
2026-11-07 18:21:42 -08:00
Anees Iqbal 98fe2a3bd5 🆕 Replace the tree with libreims_vgpu and its C API
This repository now holds libreims_vgpu, a Rust library that is the host
side of the paravirtualized GPU macOS guests drive, in place of Apple's
ParavirtualizedGraphics.framework: the library and its C API
(reims_vgpu.h), the PCI device's option ROM, QEMU's apple-gfx on that API
(vendor/qemu), the behaviour-lock suite that drives the C API as QEMU
does, and reims-ctl, the VM manager users run. README.md says what it is
and how it is laid out, and AGENTS.md how to change it.

Every file of the earlier tree is replaced. vendor/qemu moves to the
steelbrain/reims-vgpu branch of the same public repository.
2026-10-11 20:27:17 +03:00