Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,25 +75,6 @@ jobs:
- name: sokol backend unit tests + audio.zig compile-check
run: cd backends/sokol && zig build test

- name: wgpu backend WAV parser tests
# Re-enabled: wgpu_native_zig + zglfw are now on 0.16-compatible
# pins, and `zig build test` builds only the pure WAV parser
# (host target, no native deps), so it stays cheap on both OSes.
run: cd backends/wgpu && zig build test

# Build the standalone wgpu backend demo on macOS. This is the
# regression lock for the Apple render path: the example used to
# link a nonexistent Dawn `zdawn` artifact (panicked "unable to
# find artifact 'zdawn'"), and surface creation was Win32-only.
# Building here exercises example/build.zig (drops Dawn, links the
# Metal/QuartzCore/Foundation frameworks wgpu-native needs) AND
# compiles window.zig's CAMetalLayer surface path for real on an
# Apple target. macOS-only: the frameworks + Cocoa surface only
# exist here, and it's the platform the break shipped on.
- name: wgpu backend demo build (macOS)
if: runner.os == 'macOS'
run: cd backends/wgpu/example && zig build

# Linux-only: raylib-zig transitively pulls hexops/xcode-frameworks
# via `git+https://`, which Zig's git fetcher can't resolve on the
# macos-latest runner ("unable to discover remote git server
Expand Down Expand Up @@ -249,39 +230,6 @@ jobs:
cd .labelle/raylib_desktop
zig build

# wgpu desktop example — build-only, same recipe. This backend
# previously had NO example build in CI at all, which let a codegen
# bug ship (its lifecycle template lacked the {{module_vars}} slot,
# so generated mains referenced undeclared `_preview_*` helpers and
# failed sema — caught only when a real project switched backends).
# bgfx isn't built here (or anywhere in this repo) — it's extracted to
# labelle-bgfx, which builds + tests it (incl. the android .so) in its
# own CI. This job covers the bundled backends' example codegen.
- name: Generate + build the wgpu example
env:
LABELLE_ASSEMBLER: ${{ github.workspace }}/labelle-assembler/zig-out/bin/labelle-assembler
run: |
cd labelle-assembler/examples/wgpu
$GITHUB_WORKSPACE/labelle-cli/zig-out/bin/labelle generate

# Lock the `link_wgpu` template: wgpu-native's static lib pulls
# Apple system frameworks, so the generated build MUST link
# Foundation/QuartzCore/Metal on macOS/iOS or those targets fail
# to link with undefined Metal symbols. This runner is Linux (so
# `zig build` below can't link-test the frameworks), but the
# generated build.zig is platform-agnostic — assert the framework
# links are present so a template regression is caught here even
# without a macOS runner. The standalone demo build in the
# build-and-test macOS job link-tests them for real.
for fw in Foundation QuartzCore Metal; do
grep -qF "linkFramework(\"$fw\"" .labelle/wgpu_desktop/build.zig \
|| { echo "E: generated wgpu build.zig is missing linkFramework(\"$fw\") — link_wgpu template regression"; exit 1; }
done
echo "PASS: generated wgpu build.zig links Foundation/QuartzCore/Metal"

cd .labelle/wgpu_desktop
zig build

# External (out-of-tree) backend wiring, backend-AGNOSTIC. Proves the
# opt-in `.backend_package` path end-to-end: `install` FETCHES the backend
# package from GitHub into the cache, then `generate` stages it + codegens
Expand Down
25 changes: 25 additions & 0 deletions backends/null/backend.manifest.zon
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.{
// null backend manifest — pluggable-backends epic (labelle-assembler#386).
//
// Presence of this file opts the null DESKTOP build into the manifest-splice
// codegen path (manifest_splice.zig) instead of the enum `switch (cfg.backend)`
// sections in src/templates/build_zig.txt. Spliced output is byte-identical to
// the enum path (verified against a generated baseline) — the step that lets
// null move out-of-tree (its build sections travel WITH the package).
//
// Loop-style (the generated headless main drives a fixed-frame tick loop). No
// params: pure-Zig, zero native deps, and the LINK fragment is EMPTY — null has
// no artifact to link (the enum path's `.null => {}` emitted nothing).
.dir_name = "null",
.dep_name = "labelle_null",
.loop_style = .loop,
.main_loop_template = "templates/headless.txt",
.build_fragments = .{
.backend_dep = "build_fragments/backend_dep.txt",
.link = "build_fragments/link.txt",
},
.params = .{
.backend_dep = .{},
.link = .{},
},
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const backend_dep = b.dependency("labelle_wgpu", .{ .target = target, .optimize = optimize });
// Null backend — pure Zig, no native artifact. Every backend module is
// a no-op stub; the generated main() drives a fixed-frame tick loop.
const backend_dep = b.dependency("labelle_null", .{ .target = target, .optimize = optimize });
const backend_gfx = backend_dep.module("gfx");
const backend_input = backend_dep.module("input");
const backend_audio = backend_dep.module("audio");
const backend_window = backend_dep.module("window");
const glfw_artifact = backend_dep.artifact("glfw");

File renamed without changes.
26 changes: 0 additions & 26 deletions backends/wgpu/backend.manifest.zon

This file was deleted.

157 changes: 0 additions & 157 deletions backends/wgpu/build.zig

This file was deleted.

32 changes: 0 additions & 32 deletions backends/wgpu/build.zig.zon

This file was deleted.

16 changes: 0 additions & 16 deletions backends/wgpu/build_fragments/link.txt

This file was deleted.

Loading
Loading