Skip to content

Simplify browser builds and SPIR-V testing - #85

Merged
jph00 merged 2 commits into
mainfrom
simplify-browser-builds
Aug 21, 2026
Merged

Simplify browser builds and SPIR-V testing#85
jph00 merged 2 commits into
mainfrom
simplify-browser-builds

Conversation

@jph00

@jph00 jph00 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

The existing gpucpp link interface also forces --closure=1. Closure is not required by Emdawn or for correctness; it is only a size optimization. Emscripten’s bundled native Closure binary is x86-64, so Apple Silicon builds fall back to Closure’s Java implementation and gpu.cpp has to detect and configure OpenJDK. This makes every browser consumer pay for another toolchain component and slows the normal edit-link-test loop.

For gpu-browser-app, Closure reduced the combined compressed JS and Wasm artifacts from approximately 123 KB to 107 KB. That saving does not justify a second build path or a Java dependency. This PR therefore removes Closure entirely, together with the macOS Java detection and documentation. External browser consumers now inherit only the settings required for gpu.cpp to work, and development, testing, and release use the same linker path.

The integration also exposed a useful native testing boundary: downstream SPIR-V producers need to verify their generated module against gpu.cpp’s WebGPU-profile Dawn setup. The test runner now accepts ./test --spirv FILE, executes the supplied module, and checks the same known output as gpu.cpp’s assembled fixture.

CI now installs NumPy into an Actions-managed Python rather than the runner’s Homebrew Python, which rejects system-level package installation under PEP 668.

The essential design is that gpucpp supplies the WebGPU runtime requirements, applications own their Embind surface, and neither side needs Closure or Java.

@jph00
jph00 merged commit 09bdeaa into main Aug 21, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant