cl-webkit is an embeddable WebKit-style browser engine in pure Common Lisp (SBCL). Stack layout mirrors WebKit: WTF · JavaScriptCore · WebCore · WebKit API, plus a thin multi-tab shell.
| Product | Drop-in library: WebView, HTML/CSS/JS, layout, paint |
| Language | Common Lisp only (SBCL) |
| Deps | ASDF/UIOP, cl-ppcre (Quicklisp) |
| Compliance | All tracked features :implemented (0 partial / stub / missing) |
| License | MIT |
| Status | Released v2.1.0 |
| Repo | github.com/theesfeld/cl-webkit |
This library is for embedding and research. It is not a binary drop-in for Safari, Chrome, or WebKitGTK.
No patches to your app beyond a normal dependency and API calls.
git clone https://github.com/theesfeld/cl-webkit.git
# Quicklisp local-projects (recommended)
mkdir -p ~/quicklisp/local-projects
ln -sfn "$(pwd)/cl-webkit" ~/quicklisp/local-projects/cl-webkitOr point ASDF at the tree without Quicklisp:
(asdf:load-asd #p"/absolute/or/relative/path/to/cl-webkit/cl-webkit.asd");; your-app.asd
(defsystem "your-app"
:depends-on ("cl-webkit")
:components ((:file "main")))(ql:quickload :your-app) ; or asdf:load-system
(multiple-value-bind (wv text)
(webkit:render-html
"<!DOCTYPE html><html><body>
<h1>Hello</h1>
<script>document.title = 'cl-webkit';</script>
</body></html>")
(list (webkit:webview-title wv) text))Requirements on the consumer side: declare "cl-webkit" and call shipped symbols (for example webkit:render-html, webkit:make-webview, webkit:eval-js). Do not push machine-specific paths into the library sources.
- SBCL 2.x (developed on 2.6.6)
- Quicklisp or ASDF with cl-ppcre available
- Network only when you load remote URLs; core HTML/JS paths work offline
;; HTML string → webview + text dump
(webkit:render-html html-string)
;; WebView
(let ((wv (webkit:make-webview)))
(webkit:webview-load-html wv html :base-url "about:blank")
(webkit:webview-evaluate wv "1+2")
(webkit:webview-render wv :format :text))
;; Standalone JS
(webkit:eval-js "1 + 2 * 3")
;; Feature matrix
(webkit:compliance-report)
;; Summary: N implemented, 0 partial, 0 stub, 0 missingMore detail: docs/DROP-IN.md, docs/ARCHITECTURE.md.
src/
wtf/ URL, strings, utils
platform/ net, websocket, timers, event loop
jsc/ JS lexer → bytecode VM
webcore/ DOM, HTML, CSS, layout, paint, storage, workers
webkit/ WebView, policy, inspector, compliance
browser/ multi-tab shell helpers
Compliance lives in src/webkit/compliance.lisp.
Portable entry (no hardcoded home directory):
# from the cl-webkit checkout
sbcl --non-interactive --load run-tests.lispAfter Quicklisp registration:
(ql:quickload :cl-webkit)
(asdf:test-system "cl-webkit")In-repo fixtures: tests/webkit-import/, tests/wpt-mini/.
Optional upstream LayoutTests import: set WEBKIT_LAYOUT_TESTS and run scripts/import-webkit-smoke.sh (not required for the default suite).
GitHub Actions (.github/workflows/ci.yml) on main:
- Install SBCL + Quicklisp + cl-ppcre
- Symlink the checkout into
~/quicklisp/local-projects/cl-webkit - Smoke-load the public API (
render-html, compliance counts) - Run
run-tests.lisp(full suite; non-zero exit on failure)
See CONTRIBUTING.md and AGENTS.md.
- Commits: Conventional Commits
- Versioning: Semantic Versioning — CHANGELOG.md
- Language purity: first-party code is Common Lisp only (SBCL + cl-ppcre)
See SECURITY.md. Report vulnerabilities privately to william@theesfeld.net.
MIT © William Theesfeld
WebKit is a trademark of Apple Inc. This project is not affiliated with Apple or the WebKit project.