hwnd

Crates.iohwnd
lib.rshwnd
version0.0.0-2024-01-05
sourcesrc
created_at2024-01-03 17:46:24.070156
updated_at2024-01-05 18:59:50.299071
descriptionWell documented, safe-leaning, sound, low-level API bindings to `HWND`-adjacent APIs
homepage
repositoryhttps://github.com/MaulingMonkey/hwnd
max_upload_size
id1087596
size454,397
(MaulingMonkey)

documentation

https://docs.rs/hwnd

README

Well documented, safe-leaning, sound, low-level API bindings to HWND-adjacent APIs.

GitHub crates.io docs.rs License Build Status

Raison d'ĂȘtre

Intended use cases include:

  • Building block for higher level APIs.
  • Interop with existing win32-consuming C or C++ codebases (incrementally RIIRing?)
  • Direct use for cases where extra abstraction / higher level APIs are overkill.

Goals to service these use cases, in order of priority, are:

  1. APIs should be as sound as possible.
    • Spam unit tests and/or doc-tests to try to break safe APIs.
    • Thorough safety documentation of any fns or traits that must remain unsafe.
  2. Keep a 1:1 mapping to raw windows types and APIs as much as possible.
    • Maximum interoperability with existing C or C++ codebases.
    • Avoids infinite yak shaving.
    • Additional error checking / debug spam is generally discouraged to avoid suprising RIIRers with new edge cases, except to avoid soundness issues.
  3. Make APIs as safe as possible.
    • Some unsafe will generally still be required to implement said APIs.
    • Eliminating unsafe for perfectly sound APIs will make auditing the remaining unsafe code easier.
  4. Provide excellent documentation.
    • Rust specific examples for everything.

    • Thoroughly document edge cases, error codes, etc.

    • Aiming to be even better than MSDN.

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.

Commit count: 0

cargo fmt