Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 1.21 KB

README.md

File metadata and controls

23 lines (14 loc) · 1.21 KB

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