Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/webviewjs/webview/llms.txt

Use this file to discover all available pages before exploring further.

WebviewJS wraps the battle-tested Rust crates tao and wry via NAPI-RS to deliver a native, cross-platform webview experience directly inside Node.js, Deno, and Bun. Because the native addon ships as a pre-built binary for every supported target, most installs require nothing more than a single package-manager command — though Linux users need a couple of system libraries first.

System Requirements

Each platform provides the web rendering engine differently. Review the requirement for your OS before installing.
PlatformRequirement
WindowsWebView2 runtime — ships with Windows 11 and Microsoft Edge; auto-installed on Windows 10 via Windows Update
macOSmacOS 10.15 Catalina or later — WebKit is built in, no extra install needed
Linuxlibwebkit2gtk-4.1 and libxdo — must be installed manually (see below)
Node.js >= 24 is required. Check your version with node --version and upgrade via nodejs.org or your preferred version manager if needed.

Linux System Dependencies

Linux uses WebKitGTK as the rendering backend and libxdo for window automation. Install the appropriate packages for your distribution before running npm install.
sudo apt install libwebkit2gtk-4.1-dev libxdo-dev
Skipping the Linux dependencies will cause the native addon to fail at runtime with a missing shared library error. Install them before running your application.

Installing the Package

Once system requirements are satisfied, install @webviewjs/webview with your preferred package manager:
npm install @webviewjs/webview
The install step downloads the correct pre-built native addon for your platform and architecture automatically. No Rust toolchain is required for standard installs.

Supported Platform & Architecture Matrix

The following targets ship with pre-built binaries on npm. Experimental and no-CI targets are functional but may receive less frequent updates.
Target TripleOSArchStatus
x86_64-pc-windows-msvcWindowsx64✅ Supported
i686-pc-windows-msvcWindowsx86✅ Supported
aarch64-pc-windows-msvcWindowsarm64✅ Supported
x86_64-apple-darwinmacOSx64✅ Supported
aarch64-apple-darwinmacOSarm64 (M-series)✅ Supported
x86_64-unknown-linux-gnuLinuxx64✅ Supported
aarch64-unknown-linux-gnuLinuxarm64✅ Supported
armv7-unknown-linux-gnueabihfLinuxarmv7✅ Supported
i686-unknown-linux-gnuLinuxx86⚠️ No CI
aarch64-linux-androidAndroidarm64⚠️ Experimental
armv7-linux-androideabiAndroidarmv7⚠️ Experimental
x86_64-unknown-freebsdFreeBSDx64⚠️ No CI
Targets marked No CI are not continuously tested but are expected to work. Targets marked Experimental are under active development and may have missing features.

Building from Source

Building from source is only needed when contributing to WebviewJS itself or when targeting a platform that has no pre-built binary. You will need the Rust stable toolchain and Bun.
1

Install prerequisites

Install Rust (stable toolchain) and Bun >= 1.3.0. On Linux, also install the system dependencies listed above.
2

Clone the repository

git clone https://github.com/webviewjs/webview
cd webview
3

Install JavaScript dependencies

bun install
4

Compile the native addon

bun run build
This invokes the NAPI-RS build pipeline, compiles the Rust crate in release mode, and places the resulting .node binary in a platform-specific subdirectory (e.g. win32-x64-msvc/ or linux-x64-gnu/). The index.js loader is updated automatically.
For a faster iteration cycle during development you can use bun run build:debug which skips release optimisations and compiles significantly faster.

Build docs developers (and LLMs) love