Quick Answer: To embed Chromium in apps, link a library that runs Chromium's engine inside your own process. zebkit does this: your program keeps its main(), its windows, and its toolkit, and calls the engine for web views, PDFs, media, and automation. Unlike Electron, it ships no browser shell and no Node.js runtime.

Most desktop teams that want web rendering reach for Electron first. It works, but your application gets built inside Electron's runtime, windows, and packaging. zebkit takes the opposite route. It packages Chromium's engine as a library you link, the way you'd add SQLite. Here's what that means in practice, and where the trade-offs sit.

What zebkit actually packages

zebkit bundles Blink, V8 with every JIT tier, PDFium, FFmpeg, and the rest of the engine that powers Chrome. It leaves out Chrome's browser UI and Electron's runtime. The project pins its engine to Chromium 157.0.8103.38, and it targets Linux (x86-64, glibc 2.17 or newer), macOS on Apple silicon, and Windows 10 or newer on x64.

The bundled libraries matter more than they first appear. zebkit ships 17 C libraries inside the engine, exported under zebkit_vendor_*: SQLite, LevelDB, BoringSSL, zlib, Zstandard, Brotli, ICU, HarfBuzz, libxml2, libwebp, libjpeg-turbo, FFmpeg, dav1d, Opus, libvpx, FreeType, and PDFium. The project reports about 7,490 functions on each platform.

Here's the counter-intuitive part. The usual advice is to statically link your own copies of these libraries so your app stays self-contained. But if your app also needs a web view, you now carry Chromium's copies of SQLite, zlib, or FFmpeg next to yours. zebkit's pitch is that you don't ship them twice. Whether that saves you anything depends on how many of those libraries you already use, so measure before you assume.

Why integrating beats building on a runtime

Electron treats your app as a guest in its runtime. zebkit treats the engine as a guest in your process. That changes who owns the event loop, the windows, and the packaging.

zebkit runs inside your application's own loop. Programs that already have one, such as GTK, Qt, AppKit, or winit, call zebkit_init() at startup and zebkit_pump() on each tick. Programs that want the engine to run the loop call zebkit_main() and do their work in callbacks. Either way, you can draw web views into frames you control, or attach them as a child of a native window: an X11 window, an NSView, or an HWND. The examples/native-host directory in the repository shows the pattern.

Here's a minimal sketch of the callback model:

static void ready(void *data) {
    zebkit_view *view = zebkit_view_new("https://example.com/", 1024, 768);
    zebkit_view_on_load(view, loaded, NULL);
}

int main(int argc, char **argv) {
    return zebkit_main(argc, argv, ready, NULL);
}

That's the whole integration surface for a basic page. The harder work is deciding what the page is allowed to do, and that's where the design gets interesting.

The failure mode that stops most first runs

Here's the failure you'll hit first. On Linux, the engine's sandbox needs unprivileged user namespaces. If your system doesn't allow them, zebkit refuses to start and tells you why. You have two options: install the bundled zebkit-helper, or, inside a container you control, pass --no-sandbox. Don't use --no-sandbox on a machine that runs untrusted pages. The sandbox is the reason a compromised page can't reach your process.

On Windows the situation is stricter. The executable has to take part in Chromium's sandbox. You link zebkit_sandbox.lib and call zebkit_win_startup() first in main(). Skip that step and you'll find out at runtime, not at link time.

Plan for this in your CI. A container image without the sandbox prerequisites will pass your build and fail on first launch.

Controlling what pages can touch

The security model is where zebkit diverges most from a default Electron setup. A page has no zebkit JavaScript object unless your application grants it, per view, per origin, and per capability. The origin is set by the browser, not claimed by the page. Permissions a normal browser would ask about are denied rather than silently granted.

Native hooks let you decide what the engine does. You can handle permissions, navigation, popups, downloads, certificates, and network requests at each stage. Dialogs, file choosers, notifications, and the system tray can all route through your application. That gives you control, but it also means you own those decisions. If you forget to handle a file chooser, it won't open, and you'll have to figure out why.

Your application can also serve its own pages from a custom URL scheme and expose functions to them. The page calls a function, the call goes over the frame's own Mojo channel, and your C, Rust, Python, or JavaScript handler receives the JSON as written. The project says large payloads go through shared memory without base64 encoding.

Automation and PDFs without a second runtime

Two other pieces matter if you run tests or agents. zebkit reports that Playwright's API runs inside the engine, without CDP or a Node.js driver. Its figures claim 3 to 10 times faster than Playwright over CDP, and a click in 3 to 5 ms instead of 33 ms. Those are the project's own benchmarks, so run them on your hardware before you plan around them. Playwright's own clients can still connect with chromium.connect(), and the engine also accepts CDP for tools that expect Chromium's DevTools server.

PDF handling is the other part you'd otherwise build yourself. zebkit exposes a full PDFium-based API, including rendering, text extraction, search, annotations, forms, redaction, merging, and signature integrity checks. A short C example renders page one to PNG and reads its text. You don't need an engine loop for that, which is useful for batch jobs.

Comparing the approaches

ApproachWhat your app shipsJavaScript runtimeWho owns the event loop
ElectronYour app inside Electron's runtime and packagingNode.js plus ChromiumElectron
zebkitYour native binary plus the zebkit library and helperV8 inside the engine, or zebkit-js, with no NodeYou, via zebkit_pump() or zebkit_main()
Chromium Embedded Framework (CEF)Your app plus CEF's Chromium buildYour choice of embedderYour app, through CEF's message loop

Pick Electron when you want a large existing ecosystem and don't need to own the window or runtime. Pick zebkit when a native app needs web views, PDFs, or automation, and you want the engine to behave as a library. The project's own comparison says a zebkit build is 34% smaller than Electron 45.2.1, with a cold start of 2.3 s against 6.6 s. Treat those as the project's measurements, not independent results.

Trade-offs you should weigh before adopting it

Embedding a full engine carries real costs. Building from source needs about 30 GB for Chromium's tree, so most teams should use a release archive. Each release is pinned to one Chromium version, so you inherit its update cadence. zebkit notes that Google's sign-in and some debugger-detection behaviour still differ from stock Chrome, so check your target sites before committing.

Here's where most evaluations go wrong: they test a single page and call it done. Test the sandbox path on the exact OS image you ship, test your file and permission handlers, and test a long-running session for memory growth.

Frequently Asked Questions

What is zebkit?

zebkit is an embeddable Chromium engine packaged as a library for Linux, macOS, and Windows. It lets a native application link Blink, V8, PDFium, and FFmpeg without Chrome's browser UI or Electron's runtime. Your app keeps its own main(), windows, and toolkit, and calls the engine's C API or bindings for Rust, Python, Go, and JavaScript.

How do I embed a web view in a C application?

Link libzebkit.so.1 on Linux, Zebkit.framework on macOS, or zebkit.dll on Windows. Call zebkit_main() and create views in its callback, or call zebkit_init() and zebkit_pump() inside your existing loop. On Windows, call zebkit_win_startup() first in main().

Why won't zebkit start in my container?

The engine's sandbox needs unprivileged user namespaces, and many containers block them. zebkit prints the reason at startup. Install the bundled helper, or in a container you control, add --no-sandbox. Avoid --no-sandbox on machines that load untrusted pages, because the sandbox is what contains a compromised renderer.

Is zebkit smaller than Electron?

The project reports a build 34% smaller than Electron 45.2.1, with a cold start of 2.3 s against 6.6 s and 29% less memory per page. These are its own benchmarks, so measure your own app. Your result depends on how much of the engine you use and on what your app already bundles.

Your takeaway is simple: if you need a web view inside a native app, zebkit lets you embed Chromium without building on Electron's runtime. Pick one real screen from your app, add a single view with zebkit_view_new(), and run it on the exact OS image you ship. Then check the sandbox path and note how many libraries you no longer have to bundle twice. Share this with a team that's wrestling with Electron's footprint and wondering whether to embed Chromium in apps instead.