7 releases (4 breaking)

new 0.5.1 Nov 6, 2024
0.5.0 Oct 12, 2024
0.4.0 Jul 7, 2024
0.3.0 Jun 9, 2024
0.1.0 Dec 28, 2022

#35 in Windows APIs

Download history 21/week @ 2024-07-10 5/week @ 2024-07-24 4/week @ 2024-07-31 2/week @ 2024-09-18 4/week @ 2024-09-25 211/week @ 2024-10-09 17/week @ 2024-10-16

228 downloads per month

MIT/Apache

295KB
3.5K SLoC

Safe bindings for the Windows Notification Facility

GitHub crates.io docs.rs license rustc 1.70+

The Windows Notification Facility (WNF) is a registrationless publisher/subscriber mechanism that was introduced in Windows 8 and forms an undocumented part of the Windows API.

This crate provides safe Rust abstractions over (a part of) this API. If you are looking for raw bindings to the API, take a look at the ntapi crate.

Note that while great care was taken in making these abstractions memory-safe, there cannot be a guarantee due to the undocumented nature of the API.

Installation

This crate is available on crates.io. In order to use it, add this to the dependencies table of your Cargo.toml:

[dependencies]
wnf = "0.5.1"

Some functionality of this crate is only available if the corresponding features are enabled. For example, in order to enable the subscribe feature:

[dependencies]
wnf = { version = "0.5.1", features = ["subscribe"] }

This is a Windows-only crate and will fail to compile on other platforms. If you target multiple platforms, it is recommended that you declare it as a platform specific dependency:

[target.'cfg(windows)'.dependencies]
wnf = "0.5.1"

Usage

For a detailed explanation on how to use this crate, see the crate documentation.

For examples, see the examples folder in the crate repository.

Minimum Supported Rust Version (MSRV) Policy

The current MSRV of this crate is 1.70.

Increasing the MSRV of this crate is not considered a breaking change. However, in such cases there will be at least a minor version bump. Each version of this crate will support at least the four latest stable Rust versions at the time it is published.

Changelog

See CHANGELOG.md

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~129MB
~2M SLoC