Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saucer/saucer
ðļ A modern, cross-platform C++ webview library
https://github.com/saucer/saucer
cocoa cpp cpp-library cpp23 cpp23-library cpplibrary cross-platform gtk4 libadwaita lightweight qt5 qt6 qwebengine saucer webkitgtk webkitgtk-6 webview webview-library webview2 wkwebview
Last synced: 4 days ago
JSON representation
ðļ A modern, cross-platform C++ webview library
- Host: GitHub
- URL: https://github.com/saucer/saucer
- Owner: saucer
- License: mit
- Created: 2021-08-13T18:06:34.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-11-14T14:03:21.000Z (29 days ago)
- Last Synced: 2024-12-02T03:05:24.001Z (11 days ago)
- Topics: cocoa, cpp, cpp-library, cpp23, cpp23-library, cpplibrary, cross-platform, gtk4, libadwaita, lightweight, qt5, qt6, qwebengine, saucer, webkitgtk, webkitgtk-6, webview, webview-library, webview2, wkwebview
- Language: C++
- Homepage: https://saucer.github.io/
- Size: 1.93 MB
- Stars: 295
- Watchers: 10
- Forks: 18
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-electron-alternatives - Saucer - gen desktop apps with web-frontend in C++. (ð Alternatives to the [Electron.js](https://electronjs.org) â / C/C++)
README
Build cross-platform desktop apps with C++ & Web Technologies---
### Documentation
The documentation can be found [here](https://saucer.github.io/).
### Examples
Examples can be found [here](./examples).
### Getting started
Learn how to create your first _saucer_ app [here](https://saucer.github.io/docs/getting-started).
---
## ð― Introduction
Saucer is a modern C++ webview library that allows you to build cross-platform desktop applications with ease.
It supports all three major desktop operating systems (Windows, Linux, MacOS) and has several backend implementations.## ðļ Features
* ðŧ Cross Platform
Windows
Linux
MacOS
Backend
Win32 & WebView2
GTK4 & WebKitGtk
Cocoa & WKWebView
Qt5 / Qt6 & QWebEngine
* ð Seamless C++ / JavaScript interoperability
* ðĶ Supports Embedding Frontend into binary
* ðŠķ Lightweight
> By using the operating systems native web renderer _(or a commonly used one)_, it is possible to create binaries as small as ~250KB* 𧰠Customizability
> Modules allow access to platform specific implementations, making it possible to tweak the library to your hearts content* ðïļ [Bindings](https://github.com/saucer/bindings)
> Saucer also exposes a C-Interface, thus making it possible to write bindings for it in your favorite language!* ðĶš Thread-Safe
* âïļ FOSS
> Licensed under MIT!* ðŠ Built-in support for frame-less windows and transparency
* [... and more!](https://saucer.github.io/)
## âïļ Code Example
```cpp
#includeint main()
{
auto app = saucer::application::acquire({
.id = "example",
});saucer::smartview webview{{
.application = app,
}};webview.set_size(900, 700);
webview.set_title("Hello World!");webview.expose(
"add_random",
[&](float number)
{
auto random = webview.evaluate("Math.random()").get();
return number + random;
},
saucer::launch::async);webview.set_file("index.html");
webview.show();
app->run();return 0;
}
```