webui is a free, open source browsers & extensions project written in C and released under MIT. It has 4,601 GitHub stars, 305 forks and 6 open issues, and was last pushed 1 months ago. On this registry it ranks #64 of 133 tracked projects in Browsers & Extensions, with 5 head-to-head comparisons available.

What is webui?

WebUI is a lightweight, portable C library that turns any web browser or WebView into the graphical interface of a native application, letting the backend be written in a preferred language while the frontend uses modern web technologies.

What it is

WebUI is a library, distributed under the MIT licence and hosted at webui.me, that lets a program render its user interface in a real web browser instead of a traditional GUI toolkit. The backend keeps control of the application logic and communicates with an HTML, JavaScript and TypeScript frontend, so teams can build a modern, professional-looking interface with the web tooling they already know. It is written in C and lives in the browsers and extensions-adjacent space of productivity and utility tooling, with topics covering browser, cpp, gui, javascript, typescript, web, webapp and webui.

The concrete problem it solves is the cost of embedding a WebView. A conventional WebView-based application needs a large SDK to build and many dependencies to run, and it can only reproduce some of the features of a real browser. WebUI inverts that: instead of embedding a WebView controller inside the program and growing the binary, it uses the browser already installed on the machine, keeping the library at a few kilobytes with a small memory footprint. The README frames it as a WebView controller that is not embedded in the program. Where an older legacy GUI library is complex and outdated, or a WebView build is too heavy to ship, WebUI offers the middle path.

Key capabilities

  • Ships as a single header file, which keeps integration into an existing C or C++ codebase minimal.
  • Runs portably with only a web browser present at runtime; a WebView is optional rather than required.
  • Uses a fast binary WebSocket communication protocol between the backend and the frontend.
  • Supports a cross-platform WebView as an optional rendering target when a browser should not be used.
  • Uses a private browser profile for safety, so the host application does not touch the user's normal browsing session.
  • Is multi-platform and multi-browser, with the supported browsers documented in the README.
  • Publishes two download channels, the Latest Stable Release and the Nightly Build, alongside online documentation at webui.me/docs.html.

Who uses it and how

  • Developers writing desktop tools in C or C++ who want an HTML frontend without adopting a legacy GUI library or bundling a full WebView runtime.
  • Frontend engineers working in JavaScript and TypeScript on an interface that a compiled backend drives over the binary WebSocket channel.
  • Projects that must stay small and portable, taking the browser-only path so the shipped binary stays in the kilobyte range.
  • Applications that need an embedded rendering surface, which take the optional cross-platform WebView instead of relying on an installed browser.
  • Teams evaluating the layout and window behaviour through the frameless examples under examples/C/frameless, including webui_frameless.png and webui_frameless_linux.png, and getting help from the WebUI GPT - C/C++ assistant.

Getting started

Download the Latest Stable Release from the GitHub releases page, or the Nightly Build tag, and follow the online documentation at webui.me/docs.html. The current line is v2.5.0-beta.4.

How it compares

Among the alternatives the project itself names, WebUI sits between legacy GUI libraries, which it describes as complex and outdated, and embedded WebView controllers, which need a large SDK to build and many dependencies to run. WebUI keeps the browser as the renderer and the library as a single header, so the program stays portable instead of carrying the WebView runtime.

When to use it — and when not to

A self-hoster does not operate a database, storage or SMTP service, because WebUI is a library rather than a server product; the real requirement is a build toolchain and, in browser mode, a web browser on the target machine. Choose the optional WebView path only if the extra SDK and dependencies are acceptable, since that is the trade-off WebUI was designed to avoid. Be aware that the current published line is a beta, the README excerpt stays high-level about per-platform build steps, and detailed platform guidance lives in the external documentation.

project readme (upstream, from github) — read inline

Logo

WebUI v2.5.0-beta.4

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.

Screenshot

Screenshot

Screenshot

GPT

Ask AI Any Question About the WebUI

WebUI GPT - C/C++

Download

Contents

Documentation

Features

  • Portable (Only needs a web browser at runtime, WebView is optional)
  • Single header file
  • Lightweight (Few Kb library) & Small memory footprint
  • Fast binary WebSocket communication protocol
  • Multi-platform & Multi-Browser
  • Uses private profile for safety
  • Cross-platform WebView (Optional)

UI & The Web Technologies

Borislav Stanimirov discusses using HTML5 in the web browser as GUI at the C++ Conference 2019 (YouTube).

CPPCon

Web application UI design is not just about how a product looks but how it works. Using web technologies in your UI makes your product modern and professional, And a well-designed web application will help you make a solid first impression on potential customers. Great web application design also assists you in nurturing leads and increasing conversions. In addition, it makes navigating and using your web app easier for your users.

Why Use Web Browsers?

Today's web browsers have everything a modern UI needs. Web browsers are very sophisticated and optimized. Therefore, using it as a GUI will be an excellent choice. While old legacy GUI lib is complex and outdated, a WebView-based app is still an option. However, a WebView needs a huge SDK to build and many dependencies to run, and it can only provide some features like a real web browser. That is why WebUI uses real web browsers to give you full features of comprehensive web technologies while keeping your software lightweight and portable.

How Does it Work?

Diagram

Think of WebUI like a WebView controller, but instead of embedding the WebView controller in your program, which makes the final program big in size, and non-portable as it needs the WebView runtimes. Instead, by using WebUI, you use a tiny static/dynamic library to run any installed web browser and use it as GUI, which makes your program small, fast, and portable. All it needs is a web browser.

Runtime Dependencies Comparison

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

Build WebUI Library

Windows

Compiler Command
GCC mingw32-make
MSVC nmake
Windows SSL/TLS (Optional)

Download and install the OpenSSL pre-compiled binaries for Windows:

# GCC
mingw32-make WEBUI_USE_TLS=1 WEBUI_TLS_INCLUDE="C:\curl-xxx-xxx-mingw\curl-xxx-xxx-mingw\include" WEBUI_TLS_LIB="C:\curl-xxx-xxx-mingw\curl-xxx-xxx-mingw\lib"

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

Linux

Compiler Command
GCC make
Clang make CC=clang
Linux SSL/TLS (Optional)
sudo apt update
sudo apt install libssl-dev

# GCC
make WEBUI_USE_TLS=1

# Clang
make WEBUI_USE_TLS=1 CC=clang

macOS

Compiler Command
Default make
macOS SSL/TLS (Optional)
brew install openssl
make WEBUI_USE_TLS=1

Minimal WebUI Application

  • C

    #include "webui.h"
    
    int main() {
      size_t my_window = webui_new_window();
      webui_show(my_window, " Hello World ! ");
      webui_wait();
      return 0;
    }
    
  • C++

    #include "webui.hpp"
    #include 
    
    int main() {
      webui::window my_window;
      my_window.show(" C++ Hello World ! ");
      webui::wait();
      return 0;
    }
    
  • More C/C++ Examples

  • Other Languages

Build WebUI Application

Windows

Compiler Type Command
GCC Static gcc -Os -Wl,-subsystem=windows my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-static -lws2_32 -Wall -luser32 -static -lole32 -lstdc++ -luuid -o my_application.exe
GCC Dynamic gcc -Wl,-subsystem=windows my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "webui-2.dll" -lws2_32 -Wall -luser32 -lole32 -o -lstdc++ -luuid my_application.exe
MSVC Static cl my_application.c /I"_PATH_TO_WEBUI_INCLUDE_" /link /LIBPATH:"_PATH_TO_WEBUI_LIB_" /SUBSYSTEM:WINDOWS webui-2-static.lib user32.lib Advapi32.lib Shell32.lib Ole32.lib /OUT:my_application.exe
MSVC Dynamic cl my_application.c /I"_PATH_TO_WEBUI_INCLUDE_" /link /LIBPATH:"_PATH_TO_WEBUI_LIB_" /SUBSYSTEM:WINDOWS webui-2.lib user32.lib Advapi32.lib Shell32.lib Ole32.lib /OUT:my_application.exe
Windows With SSL/TLS (Optional)
Compiler Type Command
GCC Static gcc -Os -Wl,-subsystem=windows my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-secure-static -lws2_32 -Wall -luser32 -static -lole32 -lstdc++ -luuid -o my_application.exe
GCC Dynamic gcc -Wl,-subsystem=windows my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "webui-2-secure.dll" -lws2_32 -Wall -luser32 -lole32 -lstdc++ -luuid -o my_application.exe
MSVC Static `cl my_application.c /I"PATH_TO_WEBUI_INCLUDE" /link /LIBPATH:"_PATH_TO_W

readme truncated — read the full docs on github

Frequently asked questions

Is webui free to use?

webui is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does webui do?

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 li

What is webui written in?

webui is primarily written in C. Its source is publicly available at https://github.com/webui-dev/webui, and it has 4,601 GitHub stars.