#webview #window #applications #view #web #electron #integration

webview_app

Simple integration of a web view in an application window like Electron

5 unstable releases

0.5.1 Jul 24, 2021
0.5.0 Jul 24, 2021
0.4.0 Jul 13, 2021
0.3.3 Jun 9, 2021
0.1.4 May 22, 2021

#1136 in GUI

MIT license

46KB
800 lines

webview-app

Simple integration of a web view in an application window like Electron, but using rust as programming language

Prerequisites on Linux (Fedora)

  • sudo dnf install gtk3-devel
  • sudo dnf install libsoup-devel
  • sudo dnf install webkit2gtk3-devel.x86_64
  • sudo dnf install libudev-devel

To run example

cargo run --example hello

Icon in Windows

Use winres and build-script build.rs with res.set_icon(). This Icon will be the web view windows icon.


lib.rs:

webview_app

Simple integration of a web view in an application window like Electron, but using rust as programming language. On Windows webview2 will be used as webview, on Linux it is WebKit GtkWebview2. Here is an easy example to create and run a simple webview app displaying crates homepage:

use webview_app::{app::App, app::AppSettings};

fn run_app() {
    let app = App::new(
        AppSettings { 
            title: "Rust Web View".to_string(),
            url: "https://crates.io".to_string(), 
            ..Default::default()
        }
    );
    app.run();
}

fn main() {
    run_app();
}

Dependencies

~10–27MB
~392K SLoC