Repository navigation
Conversation
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.
Adds an opt-in Blink engine for macOS. It runs Chromium's renderer through CEF instead of WKWebView. As with our pinned WebKit engines, the engine is not bundled into the app: it's a separate build that lives in the engine store, and a project pins it by id. The design is decision D048 in the internal notes. This is experimental and phase 1: macOS only, with gaps listed below.
How it works
cefis a new engine family, so a Blink build has an ordinary engine id (for examplecef-154.0.28-154.0.8037.58-bunmaska1-macos-arm64). It's installed and pinned like any other engine;BUNMASKA_ENGINE_IDworks as an alias ofBUNMASKA_WEBKIT_ID.platform/index.tsstarts the CEF backend. Blink draws the page; bunmaska's normal macOS window code still handles the window itself.bun:ffi, with a small C shim that Bun's built-in compiler (TinyCC) builds when the app starts. CEF can call back from any thread, and the shim hands those calls to the JavaScript thread.executeJavaScript,capturePage,printToPDFandsendInputEventare implemented.platform/web-scripts.ts, so preload, contextBridge and IPC behave as on the WebKit backends.tools/engine/build-cef-engine.tsbuilds an engine from the official CEF download: it picks a build matching our pinned CEF API version, and compiles a small helper app withclang -std=c17 -pedantic -Werror.Known gaps (fail loudly instead of acting on the wrong engine)
session.cookiesandsession.clearStorageDatareject withUnsupportedPlatformErrorunder Blink.protocol.handleschemes are not served yet; a warning names them when a window is created.bunmaska buildrefuses a macOS build pinned to Blink.cef_shutdownis skipped, and only macOS is supported.Review
userData/Blink. It used to sit next torequestSingleInstanceLock's lock files, which caused a roughly 20-second stall on launch.attachWebKitView, and the run loop is untouched. An engine only gets a drain hook.Checks
bun run validateexits 0, with 1939 pass, 185 skip and 0 fail.executeJavaScript, capture, PDF, clean close) on both Blink and the system WebKit;🤖 Generated with Claude Code