Skip to content

Project base for using webview with rust and preact

Notifications You must be signed in to change notification settings

v-pan/webview-preact

Repository files navigation

webview-preact

A baseline / template for new projects experimenting with using Preact and Webview on Rust, a library that renders web-based GUIs as native desktop applications by using the OS level browser renderer, instead of bundling an instance of Chromium like with Electron.

Development Setup

  1. Install dependencies with yarn install
  2. Install wasm-pack from here
  3. Run yarn run build. The first build may take a while, but subsequent builds will be much faster.

This will generate TS types from Rust types for you, and helps with RLS, as well as being able to run cargo build without re-packaging

Running the application

  1. Run yarn start

  2. Alternatively, you can also serve the frontend only using parcel index.html. This can help debug issues with the frontend, as it will not be inlined

Distribution

  • See the WebView README for details on platforms
  • Compiles to target/webview-preact on Linux, which can be distributed standalone
  • Additional steps are required for Windows and MacOS

About

Project base for using webview with rust and preact

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published