libs-webkitcef is a GNUstep WebKit-compatible framework backed by the
Chromium Embedded Framework (CEF). It provides a WebView Objective-C API for
loading web pages, navigating browser history, and evaluating JavaScript from
GNUstep applications.
The repository also includes a small NetStep application that uses the
framework.
This is an early version of the WebBrowser demo (replaced by NetStep) running on Linux using GNUstep...
Showing GNUstep
WebKit/- GNUstep framework sources, public headers, CEF integration, and helper scripts.Applications/WebBrowser/- sample GNUstep application usingWebView.WebKit/Documentation/- detailed notes about the build, CEF integration, linker fixes, and application setup.WebKit/bin/download_cef.sh- fetches and builds the CEF sample project used by this framework.WebKit/bin/install_cef_libs.sh- installs built CEF libraries into/usr/local/lib.
- A palette for Gorm so that this can be wired into a
.gorm(or other model) file for easy re-use. It might not be necessary to do this as there are no "actions" or "outlets" declared in the WebView.h. The workaround is to make a WebView using the CustomView in Gorm.
This project was started about 1-2 years ago, but there were issues I couldn't figure out so it stalled. As it turns out codex (OpenAI's tool) was instrumental in helping me to figure out how to fix some of the issues that were responsible for causing a difficult to find crash.
- GNUstep development environment with
gnustep-make - Objective-C and Objective-C++ compiler support
git,python3,cmake, andmake- CEF libraries for runtime browser functionality
The framework can compile without CEF libraries by using local stubs, but the actual browser runtime requires CEF to be downloaded and built.
Set GNUSTEP_MAKEFILES if it is not already available in your environment:
export GNUSTEP_MAKEFILES="$(gnustep-config --variable=GNUSTEP_MAKEFILES)"Build the framework and demo application:
makeBuild only the framework:
cd WebKit
makeBuild only the demo application:
cd Applications/WebBrowser
makeInstall the framework with the normal GNUstep make target:
cd WebKit
make installDownload and build CEF from the WebKit directory:
cd WebKit
./bin/download_cef.shThe build system looks for CEF under:
WebKit/cef_build/cef-project
After CEF is available, rebuild the framework:
cd WebKit
make clean
makeIf applications cannot locate the CEF shared libraries at runtime, source the environment helper before running them:
source WebKit/webkit-env.shAlternatively, install the built CEF libraries into /usr/local/lib:
cd WebKit
./bin/install_cef_libs.shImport the public header and add a WebView to an AppKit view hierarchy:
#import <WebKit/WebView.h>
WebView *webView = [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)];
[windowContentView addSubview:webView];
[webView loadURL:@"https://www.gnu.org"];The public API includes:
loadURL:loadRequest:loadHTMLString:baseURL:reloadstopLoadinggoBack/goForwardcanGoBack/canGoForwardstringByEvaluatingJavaScriptFromString:evaluateJavaScript:completionHandler:mainFrameURLmainFrameTitle
- Familiar Objective-C
WebViewAPI surface for GNUstep applications. - Chromium rendering engine via CEF when available, enabling modern web compatibility.
- Dual-mode build: compiles with CEF when present and falls back to local stubs when not.
- Lazy CEF initialization at first use, reducing startup work for apps that do not immediately load web content.
- Simple GNUstep build integration (
make, framework target, sample app target). - Includes a working sample browser app (
Applications/WebBrowser) that can be used as a reference.
- Full runtime browsing requires CEF binaries/libraries; stub mode compiles but does not provide a real browser engine.
- CEF setup and build can take significant time and disk space compared to pure Objective-C frameworks.
- Runtime linking may require environment setup (for example
LD_LIBRARY_PATH) or installing CEF libs system-wide. - Current integration is primarily tuned for GNUstep/Linux workflows; behavior and packaging on other platforms may need additional adjustments.
- JavaScript evaluation is currently execute-first; synchronous return values are limited and async completion behavior is basic.
- Popup/new-window behavior is framework-managed and may differ from desktop browsers depending on app policy.
Start with these files for more detail:
WebKit/Documentation/QUICK_START.mdWebKit/Documentation/BUILD_CEF_OPTIONAL.mdWebKit/Documentation/BUILD_APPLICATIONS.mdWebKit/Documentation/CEF_INTEGRATION_GUIDE.md
If make reports that GNUSTEP_MAKEFILES is missing, install or initialize
GNUstep make support and export the value from gnustep-config.
If the framework builds but the demo application fails to link or run, verify
that CEF was built and that the CEF Release directory is available through the
framework rpath, LD_LIBRARY_PATH, or /usr/local/lib.
If CEF headers or libraries are not present, the framework build falls back to stub compilation. This is useful for validating the Objective-C API but does not provide an embedded browser at runtime.
Source files in this repository are licensed under the GNU General Public License, version 3 or later. See the notices in individual source files for details.