@webviewjs/webview, satisfying the platform-level system dependencies, and verifying that your environment can open a native window. If you need to compile the Rust extension yourself, see Building from source at the bottom.
Prerequisites
Each operating system needs a native webview runtime and, on Linux, a few additional libraries. Check the tab for your platform before you install the npm package.- Windows
- macOS
- Linux
WebviewJS uses the WebView2 runtime that ships with every modern version of Windows:
- Windows 11 — WebView2 is built in; no action needed.
- Windows 10 — WebView2 is automatically installed alongside Microsoft Edge. If Edge is absent on a corporate machine, download the Evergreen Bootstrapper from Microsoft.
.node binary for your architecture (x64, x86, or arm64) is downloaded automatically by npm.Install the package
Once the system prerequisites are in place, install@webviewjs/webview from npm. The postinstall script downloads the prebuilt binary that matches your platform and architecture automatically.
Verify your installation
Create a small test file to confirm that the native module loads and can open a window:verify.mjs
Building from source
Building from source requires the Rust stable toolchain and Bun in addition to the system dependencies above. Use this path when:- You are targeting a platform or architecture without a prebuilt binary.
- You need to apply a local patch to the Rust extension.
- You are contributing to the project itself.
.node file is placed in a platform-specific subdirectory (for example, win32-x64-msvc/ or linux-x64-gnu/) and index.js is updated automatically to load it. You can then use the local build directly by pointing your project’s dependency at the cloned folder.