Crate nw_sys

source ·
Expand description

github crates.io docs.rs license

Overview

nw-sys provides wasm_bindgen bindings for Node Webkit JavaScript APIs offered by the NWJS project, allowing development of interactive desktop applications based on Node Webkit in Rust using WASM.

Various helper structures that simplify this API and provide the Rust builder pattern are available via the workflow-nw crate.

Interactive installers for applications created using this crate targeting Windows, MacOS and Linux operating systems can be built using cargo-nw packaging tool.

An example application demonstrating use of these APIs can be found here: https://github.com/aspectron/nw-sys-example


This framework is maintained by ASPECTRON. If you find this crate useful, please consider supporting us. For more information, please visit https://aspectron.org.


Modules

App bindings providing application control, access to command-line arguments, working directory, paths for the browser data folders, cache control, origin control, global keyboard hotkey registration, proxy control, underlaying browser control and package.json manifest access.
Access to the system clipboard allowing to copy and paste images from and to other applications.
Errors produced by the nw_sys crate.
Functionality for building application, popup and tray menus.
Menu item control used in conjunction with the Menu interface.
Chrome system notification API, allows creation of desktop / system notifications.
Helper trait for managing options struct which extends Object
nw-sys prelude
Result type used by nw_sys crate encapsulating internal Error enum.
Access to system display information, including system resolution, display layout and display layout change notification events.
Access to the system shell. Allows running external programs, open Shell (File Explorer / Finder) windows at different locations as well as launching external applications based on file type associations.
Register keyboard shurtcuts that will be received by your application.
Creation and management of the System Tray Icons and Menus.
Helper utilities for the browser Window, Document and DOM element access
Creation and management of application windows. Provides control such as maximizing, minimizing and restoring application windows, changing the title, size and position, window transparency, control over kiosk and full-screen modes, window image capture, iframe control and print options control including print header, footer and other options.

Structs

Interface for interacting with the system clipboard. For usage example please refer to nw_sys::clipboard
Menu interface. For usage example please refer to nw_sys::menu
Interface for controlling menu items. For usage example please refer to nw_sys::menu
Access to the global nw namespace.
Interface for registering keyboard shortcuts. For usage example please refer to nw_sys::shortcut
Interface for creating system tray icons and menus. For usage example please refer to nw_sys::tray
Interface for managing application windows. For usage example please refer to nw_sys::window

Functions

Helper to test whether the application is running under Node Webkit or in a regular browser environment.
Getter for the global nw namespace object