embed_ui

Crates.ioembed_ui
lib.rsembed_ui
version
sourcesrc
created_at2025-05-05 00:44:46.055686+00
updated_at2025-05-06 19:17:00.065133+00
descriptionThe simplest webview library ever made, probably
homepage
repository
max_upload_size
id1660028
Cargo.toml error:TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(WebAppEnjoyer)

documentation

README

embed_ui

The simplest webview library ever made, probably

Design

embed_ui uses the system's native webview to give developers making rust applications acess to web features without greatly increasing the size of the final binary.

unlike most other webview libraries it doesn't actually run the webviews inside of the program it gets called in, it actually calls a separate program which is included with the library and can be acquired by running cargo install embed_ui.

this does mean that each individual webview consumes more memory and cpu time, however it also means that webviews can be created from any thread and, for the main program, the webview creation is practically instant(all it does is call the webview_runner program with the specified url as an argument), so it is perfect for developers who have an app that might need to use some of the web's features but don't want to have to work around the complexities of blocking the main thread with a never-ending event loop that controls the webviews.

Examples

  • A developer has created a command line tool, however they feel that a command line enviroment limits their ability to provide users an adequate documentation that can best explain all of their features, so they decide to write their documentation as a webpage and then load that page using embed_ui, solving the problem.

  • A developer creates an alpha version of their app and he wants users to be able to acess the latest version of his app, so they use embed_ui to create a dynamic download page that always has the latest versions of their app available.

  • Someone creates an app with the fallowing code and sends it to their friend:


    use embed_ui;

    fn main(){

        loop{
            embed_ui::create_webview_window("https://example.com");
        }
    }

Setup

For embed_ui to work you must also globally install the webview_runner binary, this is done by using the command cargo install embed_ui.

besides that the library is completely normal.

Commit count: 0

cargo fmt