2023-07-24 21:31:17 +03:00
< div align = "center" >
2024-01-05 20:53:31 +03:00
![Logo ](https://raw.githubusercontent.com/webui-dev/webui-logo/main/webui_240.png )
2023-05-12 06:26:52 +03:00
2024-06-05 02:21:59 +03:00
# WebUI v2.5.0-beta
2021-03-21 01:53:42 +03:00
2023-10-29 08:26:32 +03:00
[build-status]: https://img.shields.io/github/actions/workflow/status/webui-dev/webui/ci.yml?branch=main& style=for-the-badge& logo=githubactions& labelColor=414868& logoColor=C0CAF5
[last-commit]: https://img.shields.io/github/last-commit/webui-dev/webui?style=for-the-badge& logo=github& logoColor=C0CAF5& labelColor=414868
[release-version]: https://img.shields.io/github/v/tag/webui-dev/webui?style=for-the-badge& logo=webtrees& logoColor=C0CAF5& labelColor=414868& color=7664C6
[license]: https://img.shields.io/github/license/webui-dev/webui?style=for-the-badge& logo=opensourcehardware& label=License& logoColor=C0CAF5& labelColor=414868& color=8c73cc
2023-10-29 08:20:18 +03:00
[![][build-status]](https://github.com/webui-dev/webui/actions?query=branch%3Amain)
[![][last-commit]](https://github.com/webui-dev/webui/pulse)
[![][release-version]](https://github.com/webui-dev/webui/releases/latest)
[![][license]](https://github.com/webui-dev/webui/blob/main/LICENSE)
2021-03-21 01:53:42 +03:00
2024-06-01 03:22:39 +03:00
> 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 lib.
2021-03-21 01:53:42 +03:00
2024-05-27 23:19:00 +03:00
![Screenshot ](https://github.com/webui-dev/webui/assets/16948659/39c5b000-83eb-4779-a7ce-9769d3acf204 )
2021-03-21 01:53:42 +03:00
2023-08-22 05:20:17 +03:00
< / div >
2023-04-25 05:11:31 +03:00
2023-09-02 19:17:30 +03:00
## Download
- [Latest Stable Release ](https://github.com/webui-dev/webui/releases )
2023-09-12 06:33:29 +03:00
- [Nightly Build ](https://github.com/webui-dev/webui/releases/tag/nightly )
2023-09-02 19:17:30 +03:00
2023-08-22 00:06:46 +03:00
## Contents
- [Features ](#features )
- [Showcase ](#showcase )
- [UI & The Web Technologies ](#ui--the-web-technologies )
- [Documentation ](#documentation )
- [Build ](#build )
- [Examples ](#examples )
- [Wrappers ](#wrappers )
- [Supported Web Browsers ](#supported-web-browsers )
- [License ](#license )
2021-03-21 01:53:42 +03:00
## Features
2024-05-27 23:19:00 +03:00
- Portable (*Needs only a web browser or a WebView at runtime*)
2022-09-25 02:34:28 +03:00
- One header file
2023-11-30 02:23:54 +03:00
- Lightweight (*Few Kb library*) & Small memory footprint
- Fast binary communication protocol
2022-10-30 04:41:20 +03:00
- Multi-platform & Multi-Browser
2022-10-30 22:29:10 +03:00
- Using private profile for safety
2024-05-27 23:19:00 +03:00
- Cross-platform WebView
2022-10-30 22:29:10 +03:00
2023-08-22 00:06:46 +03:00
## Showcase
2023-05-09 06:03:41 +03:00
2023-09-12 05:23:19 +03:00
This [text editor ](https://github.com/webui-dev/webui/tree/main/examples/C/text-editor ) is a lightweight and portable example written in C using WebUI as the GUI library.
2023-05-09 06:03:41 +03:00
2023-07-24 18:38:53 +03:00
< div align = "center" >
2023-07-25 00:10:50 +03:00
![Example ](https://github.com/webui-dev/webui/assets/34311583/c1ccf29c-806a-4742-bfd7-a3dc30cab70b )
2023-07-24 18:38:53 +03:00
< / div >
2023-05-09 06:03:41 +03:00
2023-08-22 00:06:46 +03:00
## UI & The Web Technologies
WebUI v2.0.7
* Switch from GPL to LGPL
* Deno example is ready
* Adding `void _webui_free_all_mem()` to release all dynamic mem at exit
* Break Change `void webui_script_interface(webui_window_t* win, const char* script, unsigned int timeout, bool* error, unsigned int* length, char* data)` to `void webui_script_interface(webui_window_t* win, const char* script, unsigned int timeout, bool* error, unsigned int* length, char** data)`
* Updating readme
* Moving Zig build file into build folder
More code cleaning and more examples is needed before we release the version 2.0.7.
2023-03-22 01:47:19 +03:00
2023-10-08 04:01:02 +03:00
[Borislav Stanimirov ](https://ibob.bg/ ) discusses using HTML5 in the web browser as GUI at the [C++ Conference 2019 (_YouTube_) ](https://www.youtube.com/watch?v=bbbcZd4cuxg ).
WebUI v2.0.7
* Switch from GPL to LGPL
* Deno example is ready
* Adding `void _webui_free_all_mem()` to release all dynamic mem at exit
* Break Change `void webui_script_interface(webui_window_t* win, const char* script, unsigned int timeout, bool* error, unsigned int* length, char* data)` to `void webui_script_interface(webui_window_t* win, const char* script, unsigned int timeout, bool* error, unsigned int* length, char** data)`
* Updating readme
* Moving Zig build file into build folder
More code cleaning and more examples is needed before we release the version 2.0.7.
2023-03-22 01:47:19 +03:00
WebUI v2.1.0
#New Features
* Supporting more web browsers
* Search for web browsers in Windows Reg.
* Using the same show() function for HTML script, files, and refresh content
* Support Chrome on macOS
#Breaking code
* Switching from `webui_show(win, html, browser);` to `webui_show(win, content);`, and it's used for HTML, files, and reload the window
* Removing `webui_show_cpy()`, `webui_refresh()`, `webui_refresh_cpy()`
2023-03-29 06:00:09 +03:00
<!-- <div align="center">
WebUI v2.0.7
* Switch from GPL to LGPL
* Deno example is ready
* Adding `void _webui_free_all_mem()` to release all dynamic mem at exit
* Break Change `void webui_script_interface(webui_window_t* win, const char* script, unsigned int timeout, bool* error, unsigned int* length, char* data)` to `void webui_script_interface(webui_window_t* win, const char* script, unsigned int timeout, bool* error, unsigned int* length, char** data)`
* Updating readme
* Moving Zig build file into build folder
More code cleaning and more examples is needed before we release the version 2.0.7.
2023-03-22 01:47:19 +03:00
< a href = "https://www.youtube.com/watch?v=bbbcZd4cuxg" > < img src = "https://img.youtube.com/vi/bbbcZd4cuxg/0.jpg" alt = "Embrace Modern Technology: Using HTML 5 for GUI in C++ - Borislav Stanimirov - CppCon 2019" > < / a >
WebUI v2.1.0
#New Features
* Supporting more web browsers
* Search for web browsers in Windows Reg.
* Using the same show() function for HTML script, files, and refresh content
* Support Chrome on macOS
#Breaking code
* Switching from `webui_show(win, html, browser);` to `webui_show(win, content);`, and it's used for HTML, files, and reload the window
* Removing `webui_show_cpy()`, `webui_refresh()`, `webui_refresh_cpy()`
2023-03-29 06:00:09 +03:00
< / div > -->
2023-07-24 21:31:17 +03:00
< div align = "center" >
2023-09-05 20:35:02 +03:00
![CPPCon ](https://github.com/webui-dev/webui/assets/34311583/4e830caa-4ca0-44ff-825f-7cd6d94083c8 )
WebUI v2.0.7
* Switch from GPL to LGPL
* Deno example is ready
* Adding `void _webui_free_all_mem()` to release all dynamic mem at exit
* Break Change `void webui_script_interface(webui_window_t* win, const char* script, unsigned int timeout, bool* error, unsigned int* length, char* data)` to `void webui_script_interface(webui_window_t* win, const char* script, unsigned int timeout, bool* error, unsigned int* length, char** data)`
* Updating readme
* Moving Zig build file into build folder
More code cleaning and more examples is needed before we release the version 2.0.7.
2023-03-22 01:47:19 +03:00
2023-07-24 21:31:17 +03:00
< / div >
2022-11-03 04:43:48 +03:00
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.
2023-08-22 00:06:46 +03:00
### Why Use Web Browsers?
2022-11-03 04:43:48 +03:00
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.
2023-08-22 00:06:46 +03:00
### How Does it Work?
2022-10-30 22:29:10 +03:00
2023-07-24 21:31:17 +03:00
< div align = "center" >
2023-09-05 20:35:02 +03:00
![Diagram ](https://github.com/ttytm/webui/assets/34311583/dbde3573-3161-421e-925c-392a39f45ab3 )
2022-10-30 22:29:10 +03:00
2023-07-24 21:31:17 +03:00
< / div >
WebUI v2.1.0
#New Features
* Supporting more web browsers
* Search for web browsers in Windows Reg.
* Using the same show() function for HTML script, files, and refresh content
* Support Chrome on macOS
#Breaking code
* Switching from `webui_show(win, html, browser);` to `webui_show(win, content);`, and it's used for HTML, files, and reload the window
* Removing `webui_show_cpy()`, `webui_refresh()`, `webui_refresh_cpy()`
2023-03-29 06:00:09 +03:00
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** .
WebUI v2.0.7
* Switch from GPL to LGPL
* Deno example is ready
* Adding `void _webui_free_all_mem()` to release all dynamic mem at exit
* Break Change `void webui_script_interface(webui_window_t* win, const char* script, unsigned int timeout, bool* error, unsigned int* length, char* data)` to `void webui_script_interface(webui_window_t* win, const char* script, unsigned int timeout, bool* error, unsigned int* length, char** data)`
* Updating readme
* Moving Zig build file into build folder
More code cleaning and more examples is needed before we release the version 2.0.7.
2023-03-22 01:47:19 +03:00
2023-08-22 00:06:46 +03:00
### Runtime Dependencies Comparison
WebUI v2.0.7
* Switch from GPL to LGPL
* Deno example is ready
* Adding `void _webui_free_all_mem()` to release all dynamic mem at exit
* Break Change `void webui_script_interface(webui_window_t* win, const char* script, unsigned int timeout, bool* error, unsigned int* length, char* data)` to `void webui_script_interface(webui_window_t* win, const char* script, unsigned int timeout, bool* error, unsigned int* length, char** data)`
* Updating readme
* Moving Zig build file into build folder
More code cleaning and more examples is needed before we release the version 2.0.7.
2023-03-22 01:47:19 +03:00
2023-10-08 04:01:02 +03:00
| | WebView | Qt | WebUI |
| ------------------------------- | ----------------- | -------------------------- | ------------------- |
| Runtime Dependencies on Windows | _WebView2_ | _QtCore, QtGui, QtWidgets_ | **_A Web Browser_** |
| Runtime Dependencies on Linux | _GTK3, WebKitGTK_ | _QtCore, QtGui, QtWidgets_ | **_A Web Browser_** |
| Runtime Dependencies on macOS | _Cocoa, WebKit_ | _QtCore, QtGui, QtWidgets_ | **_A Web Browser_** |
2021-03-21 01:53:42 +03:00
2022-11-08 07:33:03 +03:00
## Documentation
2023-08-22 05:20:17 +03:00
> **Note**
> We are currently writing documentation.
2023-10-08 04:01:02 +03:00
- [Online Documentation - C ](https://webui.me/docs/#/c_api )
- [Online Documentation - C++ ](https://webui.me/docs/#/cpp_api )
2022-11-08 07:33:03 +03:00
2022-09-29 19:46:24 +03:00
## Build
2023-08-21 19:22:40 +03:00
- **Windows**
2023-10-08 04:01:02 +03:00
2023-08-21 19:22:40 +03:00
```powershell
# GCC
mingw32-make
2023-10-08 04:01:02 +03:00
2023-08-21 19:22:40 +03:00
# MSVC
2023-10-10 02:57:23 +03:00
nmake
2023-08-21 19:22:40 +03:00
```
2023-10-08 04:01:02 +03:00
2023-10-27 07:26:54 +03:00
**Windows SSL/TLS (_Optional_)**
2023-10-26 03:17:29 +03:00
2023-10-27 02:00:23 +03:00
Download and install the OpenSSL pre-compiled binaries for Windows:
2023-10-27 07:26:54 +03:00
- MSVC: [x64 OpenSSL v3.1.3 ](https://slproweb.com/download/Win64OpenSSL-3_1_3.msi ) or [_32Bit_ ](https://slproweb.com/download/Win32OpenSSL-3_1_3.msi ). Please check this [Wiki list ](https://wiki.openssl.org/index.php/Binaries ) for more info.
2023-10-27 02:00:23 +03:00
- MinGW: [Curl for Windows win OpenSSL ](https://curl.se/windows/ )
2023-10-26 03:17:29 +03:00
```powershell
# GCC
2023-10-27 02:00:23 +03:00
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"
2023-10-26 03:17:29 +03:00
# MSVC
2023-10-27 02:00:23 +03:00
nmake WEBUI_USE_TLS=1 WEBUI_TLS_INCLUDE="C:\Program Files\OpenSSL-xxx\include" WEBUI_TLS_LIB="C:\Program Files\OpenSSL-xxx\lib"
2023-10-26 03:17:29 +03:00
```
2023-08-21 19:22:40 +03:00
- **Linux**
2023-10-08 04:01:02 +03:00
2023-08-21 19:22:40 +03:00
```sh
# GCC
make
2023-10-08 04:01:02 +03:00
2023-08-21 19:22:40 +03:00
# Clang
2023-09-07 06:34:32 +03:00
make CC=clang
2023-08-21 19:22:40 +03:00
```
2023-10-08 04:01:02 +03:00
2023-10-27 07:26:54 +03:00
**Linux SSL/TLS (_Optional_)**
2023-10-26 03:17:29 +03:00
```sh
sudo apt update
sudo apt install libssl-dev
# GCC
make WEBUI_USE_TLS=1
# Clang
make WEBUI_USE_TLS=1 CC=clang
```
2023-08-21 19:22:40 +03:00
- **macOS**
2023-10-27 07:26:54 +03:00
2023-08-21 19:22:40 +03:00
```sh
make
```
2022-09-29 19:46:24 +03:00
2023-10-27 07:26:54 +03:00
**macOS SSL/TLS (_Optional_)**
2023-10-26 03:17:29 +03:00
```sh
brew install openssl
make WEBUI_USE_TLS=1
```
2022-09-29 19:46:24 +03:00
## Examples
2023-08-22 00:06:46 +03:00
- [C ](https://github.com/webui-dev/webui/tree/main/examples/C )
- [C++ ](https://github.com/webui-dev/webui/tree/main/examples/C++ )
2023-05-13 17:47:42 +03:00
2023-08-22 00:06:46 +03:00
## Wrappers
2022-09-29 19:46:24 +03:00
2023-10-08 04:01:02 +03:00
| Language | Status | Link |
| ----------------------- | -------------- | --------------------------------------------------------- |
| Go | ✔️ | [Go-WebUI ](https://github.com/webui-dev/go-webui ) |
| Nim | ✔️ | [Nim-WebUI ](https://github.com/webui-dev/nim-webui ) |
| Pascal | ✔️ | [Pascal-WebUI ](https://github.com/webui-dev/pascal-webui ) |
| Python | ✔️ | [Python-WebUI ](https://github.com/webui-dev/python-webui ) |
| Rust | _not complete_ | [Rust-WebUI ](https://github.com/webui-dev/rust-webui ) |
| TypeScript / JavaScript | ✔️ | [Deno-WebUI ](https://github.com/webui-dev/deno-webui ) |
| V | ✔️ | [V-WebUI ](https://github.com/webui-dev/v-webui ) |
2024-01-13 11:10:44 +03:00
| Zig | ✔️ | [Zig-WebUI ](https://github.com/webui-dev/zig-webui ) |
| Odin | _not complete_ | [Odin-WebUI ](https://github.com/webui-dev/odin-webui ) |
2024-06-03 19:27:48 +03:00
| Common Lisp | ✔️ | [cl-webui ](https://github.com/garlic0x1/cl-webui )|
2024-01-13 11:10:44 +03:00
| Delphi | ✔️ | [WebUI4Delphi ](https://github.com/salvadordf/WebUI4Delphi )|
2024-05-24 09:59:23 +03:00
| QuickJS | ✔️ | [QuickUI ](https://github.com/xland/QuickUI ) |
2023-08-22 00:06:46 +03:00
## Supported Web Browsers
2023-10-08 04:01:02 +03:00
| Browser | Windows | macOS | Linux |
| --------------- | --------------- | ------------- | --------------- |
| Mozilla Firefox | ✔️ | ✔️ | ✔️ |
| Google Chrome | ✔️ | ✔️ | ✔️ |
| Microsoft Edge | ✔️ | ✔️ | ✔️ |
| Chromium | ✔️ | ✔️ | ✔️ |
| Yandex | ✔️ | ✔️ | ✔️ |
| Brave | ✔️ | ✔️ | ✔️ |
| Vivaldi | ✔️ | ✔️ | ✔️ |
| Epic | ✔️ | ✔️ | _not available_ |
| Apple Safari | _not available_ | _coming soon_ | _not available_ |
| Opera | _coming soon_ | _coming soon_ | _coming soon_ |
2021-03-21 01:53:42 +03:00
2024-05-27 23:19:00 +03:00
## Supported WebView
| WebView | Status |
| --------------- | --------------- |
| Windows WebView2 | ✔️ |
| Linux GTK WebView | ✔️ |
| macOS WKWebView | ✔️ |
2021-03-21 01:53:42 +03:00
### License
2023-05-05 04:41:03 +03:00
> Licensed under MIT License.
2023-03-27 05:21:38 +03:00
2022-10-21 05:50:17 +03:00
### Stargazers
2023-05-13 17:47:42 +03:00
[![Stargazers repo roster for @webui-dev/webui ](https://reporoster.com/stars/webui-dev/webui )](https://github.com/webui-dev/webui/stargazers)