| Crates.io | webview_app |
| lib.rs | webview_app |
| version | 1.2.1 |
| created_at | 2021-05-21 14:38:33.67638+00 |
| updated_at | 2024-12-13 11:29:47.074367+00 |
| description | Simple integration of a web view in an application window for windows and linux similar to Electron |
| homepage | |
| repository | https://github.com/uriegel/webview-app |
| max_upload_size | |
| id | 400357 |
| size | 122,996 |
Rust Web View Application for Windows and Linux similar to Electron, but very light weight. It offers the possibility to make web requests from the web site to the rust app and to send events from rust to the web site. The web site can be hosted as integrated resource, of course alternatively via HTTP(s):// or file://.
Sample webview_app:

webview_app >= version 1.0.0 is completely redesigned and more light weight, it doesn't include a warp server anymore and doesn't need the tokio runtime either.
If you want to update from older version, you have to migrate, please look at this documentation or this tutorial.
If you don't want to migrate, you have to stick to the old version 0.5.1. Here is the crate documentation for Version 0.5.1.
webview_app includes following features:
Functional approach with webview builder:
fn on_activate(app: &Application)->WebView {
let webview = WebView::builder(app)
.title("Website form custom resources 🦞")
.save_bounds()
.devtools(true)
.webroot(include_dir!("webroots/custom_resources"))
.query_string("?param1=123¶m2=456")
.default_contextmenu_disabled()
.build();
webview
}
fn main() {
Application::new("de.uriegel.hello")
.on_activate(on_activate)
.run();
}
Sample of a Windows App with custom titlebar:

sudo dnf install gtk4-develsudo dnf install webkitgtk6.0-develsudo dnf install libadwaita-develsudo apt install libgtk-4-devsudo apt install libwebkitgtk-6.0-devsudo apt install libadwaita-1-devcargo run --example hello
oder
cargo run --example hello --release
Use winres and build-script build.rs with res.set_icon(). This Icon will be the web view windows icon.