Skip to content

graphics: SDL3 and raylib on BCR modules; drop rules_foreign_cc - #1694

Merged
aaylward merged 7 commits into
mainfrom
claude/great-gauss-lqkl3i
Oct 25, 2026
Merged

aaylward merged 7 commits into
mainfrom
claude/great-gauss-lqkl3i

Conversation

@aaylward

@aaylward aaylward commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

The graphics targets (trill, mandelbrot, tubing, raylib_example) were manual and broken. Before #1689 the GNU Make bootstrap failed (#1524 item 2); after it, m4 analysis failed, then sdl3's cmake configure. Nothing built them, so nothing noticed. Both libraries now build with native cc_* rules on BCR modules, with every X11/Wayland/ALSA header from the BCR rather than the host. manual is gone, so CI builds all four (test commits first).

SDL3

  • bazel_dep(name = "sdl3", version = "3.4.18") replaces //bazel/extensions:sdl3.bzl + //bazel/3p:sdl3.BUILD. The label is still @sdl3.
  • single_version_override + sdl3_cc_headers_only_external_includes.patch: sdl3 forwards the headers of the libraries it loads at runtime through a cc_headers_only rule that keeps system_includes but not external_includes. Our --features=external_include_paths files external repos' include paths in external_includes, so wayland-util.h went missing. With the feature off, the unpatched module builds. Worth sending upstream.

raylib

  • bazel/3p:raylib.BUILD is now a cc_library over raylib's seven C modules on bazel_dep(name = "glfw", version = "3.4.0.bcr.4"), as raylib's CMake does with USE_EXTERNAL_GLFW=ON. Nothing links libGL: GL 3.3 goes through the bundled glad via glfwGetProcAddress. The binary's NEEDED is libc, libm, libdl, libpthread and librt only.
  • single_version_override + rules_bison_runfiles_cstdlib.patch: glfw links xkbcommon, whose parser rules_bison generates. Its runfiles helper calls getenv without <cstdlib>, which LLVM 23's libc++ no longer includes transitively.
  • rules_foreign_cc dropped as a direct dep; nothing else used it.

Fallout

  • scripts/make-git-overrides.sh copied raylib.BUILD into its clone only on first creation, so an edited BUILD file silently built the old rules in sandboxes. It now refreshes the copy on every run.
  • Dockerfile.ci and scripts/setup/setup-linux drop the SDL -dev packages, cmake, ninja-build and pkg-config; nothing builds against them now. Since ci: run container jobs on ci-base tagged by Dockerfile content #1693 this PR's CI runs on the image it describes (df-60ea3e596d12).

Locally (24.04 sandbox without the SDL -dev packages): all four targets build under -Werror. bazel test //:buildifier_test //domains/graphics/... passes. raylib_example and mandelbrot start and exit cleanly with no display. scripts/test-make-git-overrides, scripts/test-ci-image-tag and scripts/actionlint pass. MODULE.bazel.lock is from a resolution run without the sandbox overrides.

Review panel: not run.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
iili 2e00c3b Commit Preview URL

Branch Preview URL
Oct 25 2026, 08:27 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
1d4-web 2e00c3b Commit Preview URL

Branch Preview URL
Oct 25 2026, 08:27 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ast-lol 2e00c3b Commit Preview URL

Branch Preview URL
Oct 25 2026, 08:28 PM

@aaylward aaylward changed the title sdl3: take the BCR module instead of a foreign_cc cmake build graphics: SDL3 and raylib on BCR modules; drop rules_foreign_cc Oct 25, 2026
@aaylward
aaylward force-pushed the claude/great-gauss-lqkl3i branch from 72b891c to 43feee6 Compare October 25, 2026 19:05
@github-actions github-actions Bot added the service:unknown Impacted services could not be computed label Oct 25, 2026
@aaylward
aaylward merged commit dedffce into main Oct 25, 2026
25 checks passed
@aaylward
aaylward deleted the claude/great-gauss-lqkl3i branch October 25, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

service:unknown Impacted services could not be computed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants