37 points Riiiiichard 1 hour ago 20 comments
Riiiiichard 1 hour ago | parent
zebkit is Blink, V8, PDFium and FFmpeg in one library you link into your own program, in C, Rust, Python or JavaScript. Your app keeps its own event loop, windows and toolkit. Where it needs the web it adds a view. It can be a window, a child of your own window (X11, NSView, HWND), or off-screen with the frames handed to you.
Against the latest Electron (45.2.1), on Linux: - 34% smaller (62 MB compressed) - cold start in 2.3 s instead of 6.6 - pages in 29% less memory - same DOM, text-layout and JavaScript speed
No Node: your app is native code, or JavaScript run on the engine's own V8.
Everything the engine would show the user or ask of the system is your app's to decide: - permissions, popups, downloads and certificates - network requests, at every stage - the window frame, so the page can be your title bar - menus, dialogs, notifications and tray icons - USB, HID and serial device pickers - screen capture
Without your code, a page gets nothing a cautious browser wouldn't give it.
For automation and AI agents, it speaks CDP as Chromium's own DevTools server, so Puppeteer, Playwright and any CDP client connect unchanged. It also runs Playwright's API natively inside the engine, with no CDP, no Node and no JSON between processes. A click takes 2 ms instead of 33 ms with Playwright on Chrome over CDP, and a screenshot 12 ms instead of 34. Playwright's own clients can attach to that with chromium.connect(), and there's an MCP server.
It also exports Chromium's own C libraries for your app (SQLite, BoringSSL, ICU, HarfBuzz, zstd and others), plus a full PDF API.
Chromium 157. Linux, macOS (Apple silicon) and Windows. cargo add zebkit, or pip install zebkit.
https://github.com/ikey4u/zebkit
I'd love feedback, especially from people who've hit Electron's or CEF's limits.
rafram 54 minutes ago | parent
Riiiiichard 46 minutes ago | parent
It packages Chromium as a library you can embed directly into applications to add browser capabilities.
It’s trimmed down to be 33% smaller than Electron, with native browser automation APIs for AI agents that run 3–10× faster than tools like Playwright operating over CDP. It also directly exposes 7,000+ functions from Chromium’s bundled libraries for your application to use.
kg 51 minutes ago | parent
ethersteeds 46 minutes ago | parent
Riiiiichard 34 minutes ago | parent
prologic 1 hour ago | parent
Riiiiichard 54 minutes ago | parent
One clarification: Zebkit still uses Chromium's sandboxed renderer processes and shared memory internally. The embedding interface is a C API: your application links the library, keeps its own window and event loop, and can either embed a web view or receive off-screen frames to draw itself.
There's no Go binding yet, but the C API should be usable through cgo. If you give it a try, I'd love to hear where it fits your setup and where the integration gets awkward. Thanks for sharing your use case!
prologic 42 minutes ago | parent
I already noticed Webkit doesn't support Wayland on Linux, and some sandbox limitations on Windows.
I assume you're working on improving this? I think I'll just focus on a PoC for macOS right now, and see how that goes!
Riiiiichard 35 minutes ago | parent
It has the same sandbox support and limitations as Chromium. It supports X11 default in Linux and with limited Wayland support.
It has been tested on M4 macbook and works fine, if you have issues, just post it on the project.
amelius 57 minutes ago | parent
Riiiiichard 51 minutes ago | parent
A browser is a good choice if it fits your app! Zebkit is for embedding Chromium into a native app while keeping control of the host.
shinryuu 50 minutes ago | parent
torginus 42 minutes ago | parent
That's also a fairly pared down version of the Chrome engine, designed for embedding used by tons of projects, like games for their in game lobbies or OBS for their Web overlays.
Personally, my problem with CEF is that it keeps Chrome fairly vanilla - and there's a lot of things in there that you wouldn't want to include in your user app.
But there's a reason they did it like this - if they really took an axe to Chrome's codebase, they'd basically lose the ability to upstream new versions.
Zebkit on the other hand sounds like it's gonna be more granular - we'll if they cope with this better, but I think there's definitely a market for a much more lightweight browser engine that's broadly compatible - for example, just getting rid of sandboxes and process isolation would be a huge but incompatbile change.
So would be dropping large modules like WebRTC or video playback or webusb or whatever, that I'm sure 99% of apps don't end up using.
qalmakka 24 minutes ago | parent
Riiiiichard 12 minutes ago | parent
For the size, I have some more to address: the real weight comes from Blink, V8, skia, network stack and media. WebRTC cannot be dropped since Blink depends on it. Video playback is need by most apps so it stays. And the webusb is small, drop it has little benefit.
The main differences are mostly from shape, not the engine: 1. Exposed as a library with bindings (rust, python, JS without node) that can be run in your application's own event loop 2. Almost everything in the engine have a hook point such as permission, network, dialog, menus .. 3. Exported Chromium's C Library (such as boringssl, zstd, ffmpeg ..) for your app so you do not need compile it or ship it twice such as ELectron. 4. Exported feature rich PDF library (pdfium with improved) 5. Playwright inside, no cdp and no node are required
weitzj 20 minutes ago | parent
swiftcoder 17 minutes ago | parent
joahnn_s 13 minutes ago | parent
In most languages, CFFI crashes the whole app process since it's the same process. Maybe for personal stuff, it can be suitable, but nothing serious
netshade 3 minutes ago | parent
Also, very much with you in terms of exposing those libs ( like PDFium and FFmpeg ) to consumers, it lowers the shipping burden by quite a bit and just enables so much.
A note to anyone going down this road, just as an aside: actually shipping w/ Chromium ( and especially w/ FFmpeg ) can get complicated. If you're shipping on Mac OS, you'll want to worry about notarizing all your helpers along with your main process ( I'm assuming Zebkit still running w/ helper processes ). Similar w/ FFmpeg if you're linking to the FFmpeg libs. And, w/ FFmpeg, just validating that your license compliance is in fact what you want to be shipping w/ - FFmpeg has GPL and LGPL modes, so making sure you have selected the right one is important. If I recall Blink is LGPL as well, so making sure you meet what's required there has some distribution effects that are important.