Context
The native libs are built Vulkan-only today (build.rs passes --with_vulkan; no Metal). Metal requires ObjC++ (.mm) compilation, not plain clang: rive's premake swaps specific .cpp -> .mm under Apple filters and compiles src/metal/*.mm (premake5_pls_renderer.lua:343-345); ore_context.hpp imports <Metal/Metal.h>. This is the largest single build-system delta of any backend and gates all Metal work. Sequenced AFTER the Metal spike.
Scope
- Teach
build.rs to compile rive's Metal sources as ObjC++ on macOS/iOS targets (premake handles the .cpp->.mm swap under its Apple filters; ensure the shim TU and any bootstrap equivalents compile as ObjC++ where needed).
- Add the Metal-equivalent of
--with_vulkan to the premake invocation and link Metal/Foundation/QuartzCore frameworks.
- Keep the Linux/Windows builds unchanged (Metal path Apple-only).
Acceptance criteria
- A from-source build on macOS produces the rive Metal libs + an ObjC++-compiled shim and links cleanly.
- Vulkan (Linux) and D3D12 (Windows) builds are unaffected.
Refs
crates/rive-renderer-sys/build.rs:244-419
vendor/rive-runtime/renderer/premake5_pls_renderer.lua:343-345 (src/metal/*.mm Apple filter)
vendor/rive-runtime/renderer/src/metal/render_context_metal_impl.mm
Context
The native libs are built Vulkan-only today (
build.rspasses--with_vulkan; no Metal). Metal requires ObjC++ (.mm) compilation, not plain clang: rive's premake swaps specific.cpp->.mmunder Apple filters and compilessrc/metal/*.mm(premake5_pls_renderer.lua:343-345);ore_context.hppimports<Metal/Metal.h>. This is the largest single build-system delta of any backend and gates all Metal work. Sequenced AFTER the Metal spike.Scope
build.rsto compile rive's Metal sources as ObjC++ on macOS/iOS targets (premake handles the .cpp->.mm swap under its Apple filters; ensure the shim TU and any bootstrap equivalents compile as ObjC++ where needed).--with_vulkanto the premake invocation and link Metal/Foundation/QuartzCore frameworks.Acceptance criteria
Refs
crates/rive-renderer-sys/build.rs:244-419vendor/rive-runtime/renderer/premake5_pls_renderer.lua:343-345(src/metal/*.mm Apple filter)vendor/rive-runtime/renderer/src/metal/render_context_metal_impl.mm