HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
webview
webview
C++2017–2026
webview / webview

webview

Tiny cross-platform webview library for C/C++. Uses WebKit (GTK/Cocoa) and Edge WebView2 (Windows).

73Distinct people
104Mentions
2Explicit recommenders
14.3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Tiny cross-platform webview library for C/C++. Uses WebKit (GTK/Cocoa) and Edge WebView2 (Windows).

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

I love minimal code like this as a way of really understanding how something works. The author is pretty consistent too - he's got some great projects like an ultra-minimal…

benjaminjosephw used a recommendation phrase. 2 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year104 dated mentions

Observed mentions: 2017-08-20 09:13:40 UTC to 2026-06-16 19:15:02 UTC.

01020302017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 4 mentions; 3 submissions, 1 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 29 mentions; 3 submissions, 26 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 14 mentions; 1 submissions, 13 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 27 mentions; 1 submissions, 26 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 9 mentions; 1 submissions, 8 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 10 mentions; 0 submissions, 10 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC431
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC29326
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC14113
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC27126
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC918
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC10010
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC413
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC413
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC202
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC110

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
webview A tiny cross-platform webview library for C/C++ to build modern cross-platform GUIs. The goal of the project is to create a common HTML5 UI abstraction layer for the most widely used platforms. It supports two-way JavaScript bindings (to call JavaScript from C/C++ and to call C/C++ from JavaScript). NoteLanguage binding for Go has moved. Versions <= 0.1.1 are available in this repository. Platform Support Platform Technologies Linux GTK, WebKitGTK macOS Cocoa, WebKit Windows Windows API, WebView2 Documentation The most up-to-date documentation is right in the source code. Improving the documentation is a continuous effort and you are more than welcome to contribute. Prerequisites Your compiler must support minimum C++11. This project uses CMake and Ninja, and while recommended for your convenience, these tools aren't required for using the library. Linux and BSD The GTK and WebKitGTK libraries are required for development and distribution. You need to check your package repositories regarding which packages to install. Packages Debian: WebKitGTK 6.0, GTK 4: Development: apt install libgtk-4-dev libwebkitgtk-6.0-dev Production: apt install libgtk-4-1 libwebkitgtk-6.0-4 WebKitGTK 4.1, GTK 3, libsoup 3: Development: apt install libgtk-3-dev libwebkit2gtk-4.1-dev Production: apt install libgtk-3-0 libwebkit2gtk-4.1-0 WebKitGTK 4.0, GTK 3, libsoup 2: Development: apt install libgtk-3-dev libwebkit2gtk-4.0-dev Production: apt install libgtk-3-0 libwebkit2gtk-4.0-37 Fedora: WebKitGTK 6.0, GTK 4: Development: dnf install gtk4-devel webkitgtk6.0-devel Production: dnf install gtk4 webkitgtk6.0 WebKitGTK 4.1, GTK 3, libsoup 3: Development: dnf install gtk3-devel webkit2gtk4.1-devel Production: dnf install gtk3 webkit2gtk4.1 WebKitGTK 4.0, GTK 3, libsoup 2: Development: dnf install gtk3-devel webkit2gtk4.0-devel Production: dnf install gtk3 webkit2gtk4.0 FreeBSD: GTK 4: pkg install webkit2-gtk4 GTK 3: pkg install webkit2-gtk3 Library Dependencies Linux: Use pkg-config with --cflags and --libs to get the compiler/linker options for one of these sets of modules: gtk4 webkitgtk-6.0 gtk+-3.0 webkit2gtk-4.1 gtk+-3.0 webkit2gtk-4.0 Link libraries: dl macOS: Link frameworks: WebKit Link libraries: dl Windows: WebView2 from NuGet. Windows libraries: advapi32 ole32 shell32 shlwapi user32 version BSD Execution on BSD-based systems may require adding the wxallowed option (see mount(8)) to your fstab to bypass W^X memory protection for your executable. Please see if it works without disabling this security feature first. Windows Your compiler must support C++14 and we recommend to pair it with an up-to-date Windows 10 SDK. For Visual C++ we recommend Visual Studio 2022 or later. There are some requirements when using MinGW-w64. Developers and end-users must have the WebView2 runtime installed on their system for any version of Windows before Windows 11. Getting Started If you are a developer of this project then please go to the development section. You will have a working app, but you are encouraged to explore the available examples. Create the following files in a new directory: .gitignore: # Build artifacts /build C++ Example CMakeLists.txt: cmake_minimum_required(VERSION 3.16) project(example LANGUAGES CXX) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") include(FetchContent) FetchContent_Declare( webview GIT_REPOSITORY https://github.com/webview/webview GIT_TAG 0.12.0) FetchContent_MakeAvailable(webview) add_executable(example WIN32) target_sources(example PRIVATE main.cc) target_link_libraries(example PRIVATE webview::core) main.cc: #include "webview/webview.h" #include <iostream> #ifdef _WIN32 int WINAPI WinMain(HINSTANCE /*hInst*/, HINSTANCE /*hPrevInst*/, LPSTR /*lpCmdLine*/, int /*nCmdShow*/) { #else int main() { #endif try { webview::webview w(false, nullptr); w.set_title("Basic Example"); w.set_size(480, 320, WEBVIEW_HINT_NONE); w.set_html("Thanks for using webview!"); w.run(); } catch (const webview::exception &e) { std::cerr << e.what() << '\n'; return 1; } return 0; } C Example CMakeLists.txt: cmake_minimum_required(VERSION 3.16) project(example LANGUAGES C CXX) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") include(FetchContent) FetchContent_Declare( webview GIT_REPOSITORY https://github.com/webview/webview GIT_TAG 0.12.0) FetchContent_MakeAvailable(webview) add_executable(example WIN32) target_sources(example PRIVATE main.c) target_link_libraries(example PRIVATE webview::core_static) main.c: #include "webview/webview.h" #include <stddef.h> #ifdef _WIN32 #include <windows.h> #endif #ifdef _WIN32 int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow) { (void)hInst; (void)hPrevInst; (void)lpCmdLine; (void)nCmdShow; #else int main(void) { #endif webview_t w = webview_create(0, NULL); webview_set_title(w, "Basic Example"); webview_set_size(w, 480, 320, WEBVIEW_HINT_NONE); webview_set_html(w, "Thanks for using webview!"); webview_run(w); webview_destroy(w); return 0; } Building the Example Build the project: cmake -G Ninja -B build -S . -D CMAKE_BUILD_TYPE=Release cmake --build build Find the executable in the build/bin directory. Building Amalgamated Library An amalgamated library can be built when building the project using CMake, or the amalgamate.py script can be invoked directly. The latter is described below. python3 scripts/amalgamate/amalgamate.py --base core --search include --output webview_amalgamation.h src See python3 scripts/amalgamate/amalgamate.py --help for script usage. Non-CMa
Read the full README on GitHub

What Hacker News says

104 sources
What do you mean by that? WebView is just Chrome embedded inside of an Android app. Same thing already exists on Windows (Edge WebView2), macOS (WKWebView) and Linux (WebKitGTK). There's also a library that wraps all of them into a single interface: https://github.com/webview/webview The entire point of WebView is that it's a browser embedded inside of a different application, how do you expect it to be a "standalone project"?
In Show HN: Vaev – A browser engine built from scratch (It renders google.com)
If you only care about desktop and don't want to maintain a server, I do suggest taking a look at webview [1]. It uses the platform's own web browser engine (WebKitGTK on linux, WebKit on mac, WebView2 on win) which you can use to run your app using the web stack. Essentially, it gives you something like electron.js but without the excessive bloat. And you get access to the file system and everything else on the desktop. I believe there are other libraries/frameworks on github with a similar approach you might want to have a look at. [1] https://github.com/webview/webview
In Show HN: Unforget, the note-taking app I always wanted: offline first, encrypted
Personally I'd like to use github.com/webview/webview because they have bindings for a lot of languages (including golang) and use WebkitGTK behind the scenes on e.g. Linux distros. With go you can embed all your assets and serve them on a local network port where the webview points to, which makes this combination ideal for fullscreen/kiosk like applications on older machines. I am currently also trying out to build an opinionated UI library where I want to be able to reuse the defined structs on the client side (using web assembly), which would make interaction between clients and servers much easier. Not sure if I'm gonna be happy with it this way, but a man can only dream!
In Ask HN: Fastest cross-platform GUI stack/strategy

Ask HN: Do we still need Electron?

Each platform has it's own webview control available as a shared library installed with the OS. MacOS has WKWebKit based on WebKit. Windows has WebView2 based on Edge/Chromium. Linux has webkit2gtk based on WebKit. Tools like Tauri use a simple cross-platform single-header abstraction called webview.h[1]. Electron no longer allows Node.js to be called from renderer processes, all communication with Node.js is done via IPC. In this case, why do we still need Electron? Why does it have to be tied to V8/Node.js? The fact that Chromium Embedded Framework exists and is third-party makes me think that Chromium wasn't designed for being embedded, and Electron is filling that gap. This is elucidated here further here https://trac.webkit.org/wiki/WebKit2: > it's difficult to reuse their work...if another WebKit-based application or another port wa
Read the rest
nted to do multiprocess based on Chromium WebKit, it would be necessary to reinvent or cut & paste a great deal of code. It makes me think that perhaps WebKit was the better choice for embedding. The fact that Node used V8 made Chromium the choice, and that Node being called from the renderer was the original way of working. Maybe because WebKit didn't have a build for Windows was an issue too... But now that we have Bun, perhaps it's time that WebKit becomes that browser target of choice for desktop apps on macOS. Unless WebView2 for macOS arrives, which would have a more sane cross-platform story. WebView2 has a very large feature-set though which make take a while to implement for macOS. [1]: https://github.com/webview/webview/blob/master/webview.h
5 points · Open discussion
Golang can compile to windows statically, and on Windows those bindings are using the MSWebView2 API (aka Microsoft Edge webview). I know that you can also compile the webview.cc into a dll specifically, and link against that. But I'd never done with Visual C++ because I am cross-compiling from Linux to Windows. The README of the webview/webview project refers to the WebView2 SDK on NuGet, however [1] [1] https://github.com/webview/webview#windows-preparation
In Neutralinojs – Build lightweight cross-platform desktop apps with JavaScript

Showing the 15 most recent of 104 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.