#webview #bindings #graphics

livid-desktop

Lightly wraps a native webview which can be used with livid for the frontend

9 releases

0.1.8 Feb 5, 2024
0.1.7 Jan 17, 2024
0.1.6 Nov 16, 2023
0.1.4 Oct 22, 2022
0.1.3 Apr 19, 2022

#262 in Graphics APIs

45 downloads per month

MIT license

54KB
160 lines

livid-desktop

Lightly wraps a native webview which can be used with livid for the frontend.

Usage

livid-desktop = "0.1"

In your main.rs

use livid_desktop::{App, Settings};
use std::path::PathBuf;

fn main() {
    let a = App::new(Settings {
        w: 600,
        h: 400,
        title: "My App",
        fixed: true,
        port: 8080, // the default
        dist_folder: PathBuf::from("dist"), // the default
        ..Default::default()
    });
    a.run();
}

The dist folder should contain the index.html plus the wasm and javascript glue code.

Requirements

  • On Windows: No other dependencies.
  • On MacOS: No other dependencies.
  • On X11/wayland platforms, webkit2gtk:
    • Debian-based distros: sudo apt-get install libwebkit2gtk-4.0-dev.
    • RHEL-based distros: sudo dnf install webkit2gtk3-devel.

lib.rs:

livid-desktop

Lightly wraps a native webview which can be used with livid for the frontend.

Usage

livid-desktop = "0.1"

In your main.rs

use livid_desktop::{App, Settings};
use std::path::PathBuf;

fn main() {
let a = App::new(Settings {
w: 600,
h: 400,
title: "My App",
fixed: true,
port: "8080", // the default
dist_folder: PathBuf::from("dist"), // the default
..Default::default()
});
a.run();
}

The dist folder should contain the index.html plus the wasm and javascript glue code.

Requirements

  • On Windows: No other dependencies.
  • On MacOS: No other dependencies.
  • On X11/wayland platforms, webkit2gtk:
  • Debian-based distros: sudo apt-get install libwebkit2gtk-4.0-dev.
  • RHEL-based distros: sudo dnf install webkit2gtk3-devel.

Dependencies

~31MB
~12K SLoC