livid-desktop

Crates.iolivid-desktop
lib.rslivid-desktop
version0.1.8
sourcesrc
created_at2022-04-16 00:15:42.742194
updated_at2024-02-05 00:06:46.200157
descriptionLightly wraps a native webview which can be used with livid for the frontend
homepage
repositoryhttps://github.com/MoAlyousef/livid-rs
max_upload_size
id568761
size131,404
Mohammed Alyousef (MoAlyousef)

documentation

https://docs.rs/livid-desktop

README

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.
Commit count: 77

cargo fmt