Model or dataset
webui-dev/webui avatar
webui-dev/webui

WebUI: a single header library that borrows the browser you already have

Use any web browser or WebView as GUI, with your preferred language in the backend and modern web technologies in the frontend, all in a lightweight portable library.

4,653 stars310 forksCMIT

At a glance

What is it?
webui-dev/webui is a small C library that turns any installed web browser into the user interface of a native program, instead of embedding a WebView runtime. The build changes name when you enable TLS, the same library is described six ways for different toolchains, and the release line is still a beta.
Who is it for?
Adopt WebUI when you want a modern HTML interface without shipping a browser runtime, and you are willing to accept that the rendering is whatever browser the user has installed. Before you start, decide whether you need TLS, because enabling it changes the output library name to webui-2-secure and pulls in OpenSSL, and check the beta version you are pinning since the published tags are 2.5.0-beta.2 and 2.5.0-beta.3 plus a nightly.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 18 days ago.
What is it written in?
Mainly C, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • webui-dev/webui4,653 ★ · +43
Star history
Repository2026-09-232026-11-15
webui-dev/webui4.6k4.7k

43 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The runtime dependency is a browser you already have

The core claim is a dependency table, and it is the most useful thing on the page:

| GUI | Windows Dependencies | Linux Dependencies | macOS Dependencies | |-----------|---------|-------|-------| | Tauri | WebView2 | GTK/WebKitGTK | WKWebView, WebKit | | Qt | Qt bundles | Qt bundles, libxcb, libxkbcommon... | Qt bundles | | Electron | Embedded Chromium + Node.js | Embedded Chromium + Node.js | Embedded Chromium + Node.js | | NW.js | Embedded Chromium + Node.js | Embedded Chromium + Node.js | Embedded Chromium + Node.js | | WebUI | Only A Web Browser | Only A Web Browser | Only A Web Browser |

The reasoning behind the last row is spelled out on the page: a WebView based app needs a huge SDK to build and many dependencies to run, and it can only provide some features of a real browser, whereas WebUI uses real browsers to give the full feature set while keeping the software lightweight and portable. The framing is a WebView controller with the embedding removed. You link a tiny static or dynamic library, the library starts an installed browser, and the two talk over a fast binary WebSocket protocol. The cost of that choice is that the rendering is whatever browser the user has, so you do not control the engine.

Enabling TLS renames the output library

The Windows makefile shows the shape of the whole build, and one switch is worth reading closely:

code
WEBUI_OUT_LIB_NAME = webui-2
TLS_CFLAG = /DNO_SSL

# TLS Enabled
!IF "$(WEBUI_USE_TLS)" == "1"

WEBUI_OUT_LIB_NAME = webui-2-secure
TLS_CFLAG = /DWEBUI_TLS /DNO_SSL_DL /DOPENSSL_API_1_1
TLS_LDFLAG_DYNAMIC = libssl.lib libcrypto.lib

So a plain build produces webui-2 with /DNO_SSL, and adding WEBUI_USE_TLS=1 produces a different artifact, webui-2-secure, compiled with /DWEBUI_TLS, /DNO_SSL_DL and /DOPENSSL_API_1_1 and linked against libssl.lib and libcrypto.lib. Include and library directories come from WEBUI_TLS_INCLUDE and WEBUI_TLS_LIB, and when those are empty the makefile falls back to the current directory. That is the practical trap: two builds of the same source produce two different library names, so a link line written against webui-2 stops matching the moment someone turns TLS on in CI.

TLS is opt-in and each platform needs its own prerequisite

Nothing about TLS is automatic. On Windows the library builds with mingw32-make under GCC or nmake under MSVC, and enabling TLS expects OpenSSL beforehand, either the precompiled Windows binaries from slproweb for MSVC or a Curl for Windows build with OpenSSL for MinGW:

powershell
nmake WEBUI_USE_TLS=1 WEBUI_TLS_INCLUDE="C:\Program Files\OpenSSL-xxx\include" WEBUI_TLS_LIB="C:\Program Files\OpenSSL-xxx\lib"

On Linux the package comes first:

sh
sudo apt update
sudo apt install libssl-dev

# GCC
make WEBUI_USE_TLS=1

# Clang
make WEBUI_USE_TLS=1 CC=clang

And on macOS it is a Homebrew install followed by the same switch:

sh
brew install openssl
make WEBUI_USE_TLS=1

Three package managers, three prerequisite shapes, one flag. Note also that the OpenSSL API macro is pinned to OPENSSL_API_1_1, so the build is written against the 1.1 compatible surface, and that on Windows the include and lib paths are passed on the command line.

One C library, six build descriptions

The repository root carries a Makefile for MSVC, a GNUmakefile, CMakeLists.txt, build.cmake.sh, build.zig with build.zig.zon, conanfile.py and vcpkg.json. That is a deliberate choice about who is expected to build the library: Unix make, Windows nmake and mingw32-make, CMake users, Zig users, Conan users and vcpkg users each get a description written for their own tool rather than a port of someone else's. The code itself is small enough for that to work, with the public surface in include/ as webui.h and webui.hpp, the implementation in src/, and bridge/ holding the JavaScript side that pages load. The cost of the strategy is that any change to the build has to be reproduced across all of them, and that a bug report about a build failure is really a report about one of them.

The smallest program is four calls

The minimal application is short enough to read in one breath, and the C version is the reference:

c
#include "webui.h"

int main() {
  size_t my_window = webui_new_window();
  webui_show(my_window, "<html><head><script src=\"webui.js\"></script></head> Hello World ! </html>");
  webui_wait();
  return 0;
}

Create a window, hand it HTML, wait. The C++ form is the same shape with the class wrapper:

cpp
#include "webui.hpp"
#include <iostream>

int main() {
  webui::window my_window;
  my_window.show("<html><head><script src=\"webui.js\"></script></head> C++ Hello World ! </html>");
  webui::wait();
  return 0;
}

Two details in those five lines matter. The page loads webui.js from the bridge, so that script is the channel back to the native side rather than an optional extra. Longer examples live in examples/C and examples/C++, with starter kits for both languages, and wrappers exist for other languages.

civetweb is compiled in with WebSocket on and CGI off

The build flags describe the server inside, and they are explicit about what is left out:

code
CIVETWEB_BUILD_FLAGS = /Fo"civetweb.obj" /c /EHsc "$(MAKEDIR)/src/civetweb/civetweb.c" /I"$(MAKEDIR)/src/civetweb/" $(TLS_CFLAG)
CIVETWEB_DEFINE_FLAGS = /D NDEBUG /D NO_CACHING /D NO_CGI /D USE_WEBSOCKET

A local HTTP server is compiled from src/civetweb/civetweb.c into the same library, with caching disabled, CGI disabled and WebSocket switched on, which is what the binary protocol in the feature list rides on. Alongside it the WebView path is built from src/webview/win32_wv2.cpp, and one more switch controls whether the WebView2 loader is linked statically:

code
!IF "$(WEBUI_WEBVIEW_STATIC)" == "1"
WIN32_WV2_BUILD_FLAGS = $(WIN32_WV2_BUILD_FLAGS) /DWEBUI_WEBVIEW_STATIC
WV2_STATIC_LIB = "$(MAKEDIR)\WebView2LoaderStatic.lib"
!ENDIF

So the optional WebView half and the required browser half are built in the same pass, and the output is either a static library webui-2-static.lib or a DLL webui-2.dll linking user32, Advapi32, Shell32 and Ole32. The features list also notes the library uses a private profile for safety, which is worth understanding before you rely on any browser side storage between launches.

A beta line, a nightly tag, and a fixed header version

The page names itself WebUI v2.5.0-beta.4, and the published tags do not match that number. The release list holds 2.5.0-beta.3, 2.5.0-beta.2 and a nightly build whose own entry is titled WebUI Nightly Build 2026-10-28 21:12:49 UTC, while the tag metadata for the nightly carries an older date. So the version in the README header is ahead of the latest numbered tag, and the nightly channel is where day to day work lands. The repository is not archived and the last push is 2026-10-28, so the branch is moving even while the tag line sits on a beta. Two consequences for anyone pinning this. First, pin an explicit tag rather than following the nightly, since a nightly build is by definition not reproducible. Second, remember that the library is named webui-2, with the -secure suffix only when TLS is on.

Editorial conclusion

Adopt WebUI when you want a modern HTML interface without shipping a browser runtime, and you are willing to accept that the rendering is whatever browser the user has installed. Before you start, decide whether you need TLS, because enabling it changes the output library name to webui-2-secure and pulls in OpenSSL, and check the beta version you are pinning since the published tags are 2.5.0-beta.2 and 2.5.0-beta.3 plus a nightly.

Frequently asked questions

What is webui-dev/webui used for?

It lets a native program use any installed web browser or, optionally, a WebView as its user interface, with the frontend written in web technologies and the backend in the language of your choice. It is a single header file, weighs a few Kb, and communicates over a fast binary WebSocket protocol.

How do I build the WebUI library on Linux?

Run make under GCC, or make CC=clang if you want Clang. TLS is optional and off by default: install the prerequisite with sudo apt install libssl-dev and then rebuild with make WEBUI_USE_TLS=1, adding CC=clang if that is your compiler.

What changes when I set WEBUI_USE_TLS=1?

The output library name changes from webui-2 to webui-2-secure and the compile flags change from /DNO_SSL to /DWEBUI_TLS /DNO_SSL_DL /DOPENSSL_API_1_1, linking libssl.lib and libcrypto.lib. Include and library directories come from WEBUI_TLS_INCLUDE and WEBUI_TLS_LIB, falling back to the current directory when they are empty.

Does WebUI need a WebView SDK or Node.js at runtime?

No. The runtime dependency table lists only a web browser on Windows, Linux and macOS, in contrast to Electron and NW.js which bundle Chromium and Node.js and Tauri which needs WebView2 or GTK and WebKitGTK. A WebView is supported as an option, and the feature list calls cross platform WebView optional.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. webui-dev/webui on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/webui-dev-webui.svg)](https://hysenlabs.com/projects/webui-dev-webui)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/webui-dev-webui.svg)](https://hysenlabs.com/projects/webui-dev-webui)

Was this useful?