Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the first implementation milestone from #20.
What this adds
MYSTRAL_USE_WEBGLdesktop build flag for Windows, Linux, and macOSMYSTRAL_ANGLE_ROOTpackage support with platform runtime validationgetContext("webgl2")integrationjs::EngineWebGL bindings covering all 71 methods and 120 constants observed in the unchanged Three.js workloaddocument.createElementNS()and WebGL context class compatibility needed by Three.jstemplate.innerHTMLparsing with attributes, text, comments, traversal, mutation, and deep cloningexamples/webgl2-triangle.jsandexamples/html-template.jsend-to-end validationANGLE runtime libraries are copied beside the
mystralexecutable at build time but are not committed to this repository. Reproducible Linux and macOS packages are proposed in library-builder PR #1.Windows validation
Built the complete Release runtime with V8 13.1, Dawn, Skia, SDL3, static curl/zlib and ANGLE using Visual Studio 2022.
Hardware:
Windowed result:
The triangle was also captured visibly in the SDL window. A separate
--no-sdlrun selected the offscreen surface and passed the same shader, draw and pixel validation.Linux validation
Built the complete runtime with V8, Dawn, Skia, SDL3 and the packaged ANGLE Vulkan libraries. The full CLI ran under SDL/X11 with Dawn and ANGLE sharing the same window:
Separate package, native context, JavaScript binding, and X11 presentation tests all rendered and read back the expected pixels. Headless and X11 tests also passed under AddressSanitizer and UndefinedBehaviorSanitizer without reported errors.
macOS validation
The library-builder matrix builds and render-tests ANGLE Metal packages on Apple Silicon and Intel macOS. Each test creates an EGL/OpenGL ES 3 pbuffer, draws a triangle, and validates its center pixel. Packaged dylibs use executable-relative
@rpathinstall names and are ad-hoc signed after relocation.The Mystral integration preserves SDL/Dawn's original
CAMetalLayerand gives ANGLE a separate child layer. The full Mystral application has not yet been run on macOS hardware.Unchanged Three.js validation inside Mystral V8
Three.js r181 was loaded unchanged through Mystral's CommonJS loader and rendered through the new native bindings:
The coverage scene exercised
MeshStandardMaterial, typed-array texture uploads, shadow maps, aWebGLRenderTarget, andInstancedMesh. It completed with no GL error.An unchanged older browser-game runtime previously progressed through its embedded Three.js
WebGLRendererconstruction with the same ANGLE backend.Current browser-game payload validation
The current 8.66 MB two-argument browser payload is now invoked through Mystral V8 with page bootstrap scripts and the exact Howler bundle. It initializes native AudioContext, creates three independent Three.js/ANGLE renderers, mounts its Svelte templates through Lexbor, and completes synchronous execution without a JS or native fault:
A Windows CDB investigation also found and fixed a synchronous no-libuv HTTP stub violating the async callback contract, which had caused a V8 persistent-handle double release.
Current limits
This is a draft because it is the graphics foundation, not full browser WebGL compatibility yet:
Next milestones
🤖 Generated with Claude Code