Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/webui-dev/v-webui
Use any web browser as GUI, with V in the backend and modern web technologies in the frontend.
https://github.com/webui-dev/v-webui
brave-browser browser chrome chromium cross-platform firefox gui javascript safari ui vivaldi vwebui web webui
Last synced: about 1 month ago
JSON representation
Use any web browser as GUI, with V in the backend and modern web technologies in the frontend.
- Host: GitHub
- URL: https://github.com/webui-dev/v-webui
- Owner: webui-dev
- License: mit
- Created: 2022-10-28T19:36:36.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-07T21:05:32.000Z (6 months ago)
- Last Synced: 2024-08-04T01:05:42.977Z (5 months ago)
- Topics: brave-browser, browser, chrome, chromium, cross-platform, firefox, gui, javascript, safari, ui, vivaldi, vwebui, web, webui
- Language: V
- Homepage: https://webui.me
- Size: 2.86 MB
- Stars: 104
- Watchers: 6
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-v - V-WebUI - A wrapper for WebUI. A lightweight library that allows you to use any web browser as a GUI, with V in the backend and HTML5 in the frontend. (Libraries / User Interface toolkits)
README
![Logo](https://raw.githubusercontent.com/webui-dev/webui-logo/main/webui_v.png)
# V-WebUI
#### [Features](#features) ยท [Installation](#installation) ยท [Usage](#usage) ยท [Documentation](#documentation) ยท [WebUI](https://github.com/webui-dev/webui)
[build-status]: https://img.shields.io/github/actions/workflow/status/webui-dev/v-webui/ci.yml?branch=main&style=for-the-badge&logo=V&labelColor=414868&logoColor=C0CAF5
[last-commit]: https://img.shields.io/github/last-commit/webui-dev/v-webui?style=for-the-badge&logo=github&logoColor=C0CAF5&labelColor=414868
[release-version]: https://img.shields.io/github/v/release/webui-dev/v-webui?style=for-the-badge&logo=webtrees&logoColor=C0CAF5&labelColor=414868&color=7664C6
[license]: https://img.shields.io/github/license/webui-dev/v-webui?style=for-the-badge&logo=opensourcehardware&label=License&logoColor=C0CAF5&labelColor=414868&color=8c73cc[![][build-status]](https://github.com/webui-dev/v-webui/actions?query=branch%3Amain)
[![][last-commit]](https://github.com/webui-dev/v-webui/pulse)
[![][release-version]](https://github.com/webui-dev/v-webui/releases/latest)
[![][license]](https://github.com/webui-dev/v-webui/blob/main/LICENSE)> Use any web browser or WebView as GUI.\
> With V in the backend and modern web technologies in the frontend.![Screenshot](https://raw.githubusercontent.com/webui-dev/webui-logo/main/screenshot.png)
## Features
- Parent library written in pure C
- Fully Independent (_No need for any third-party runtimes_)
- Lightweight ~200 Kb & Small memory footprint
- Fast binary communication protocol between WebUI and the browser (_Instead of JSON_)
- Multi-platform & Multi-Browser
- Using private profile for safety## Installation
```sh
v install https://github.com/webui-dev/v-webui
```## Usage
> [!NOTE]
> It is recommended to use GCC or Clang to compile a WebUI V program.
> TCC is currently not working due to missing header files. E.g.:
>
> ```
> v -cc gcc run .
> ```### Example
```v
import vwebui as uiconst html = '
body {
background: linear-gradient(to left, #36265a, #654da9);
color: AliceBlue;
font: 16px sans-serif;
text-align: center;
margin-top: 30px;
}
Welcome to WebUI!
Call V
async function handleVResponse() {
const inputName = document.getElementById("name");
const result = await webui.greet(inputName.value);
document.getElementById("greeting").innerHTML = result;
}
'fn greet(e &ui.Event) string {
name := e.get_arg[string]() or { panic('expected an argument') }
println('${name} has reached the backend!')
return 'Hello ${name} ๐'
}fn main() {
mut w := ui.new_window()
w.bind('greet', greet)
w.show(html)!
ui.wait()
}
```Find more examples in the [`examples/`](https://github.com/webui-dev/v-webui/tree/main/examples) directory.
## Documentation
- [Online Documentation](https://webui.me/docs/#/v) (WIP)
> [!TIP]
> Until our online documentation is finished, you can refer to [`src/lib.v`](https://github.com/webui-dev/v-webui/tree/main/src/lib.v) or use V's built-in `v doc -comments vwebui` in the terminal for the latest overview of exported functions.- To use WebUI's debug build in your V-WebUI application, add the `-d debug` flag. E.g.:
```sh
v -d webui_log run examples/call_v_from_js.v
```- Run tests locally:
```sh
VJOBS=1 v -stats test tests/
```## Supported Web Browsers
| 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_ |### License
> Licensed under the MIT License.