Unstable APIs for scaning the Windows SDK
# Cargo.toml
[dependencies]
maulingmonkey-windows-sdk-scanner.git = "https://github.com/MaulingMonkey/windows-sdk-scanner"
// *.rs
use maulingmonkey_windows_sdk_scanner::*;
let sdk = sdk::WindowsKit::find_latest().unwrap();
let mut cpp = RootBuilder::new();
cpp.add_from_sdk(&sdk, false).unwrap();
let cpp : Root = cpp.finish();
for s in cpp.structs.values_by_key() { dbg!(s); }
- Windows SDK headers are the closest thing to being the "truth on the ground."
- I want to cross-check / verify my Rust api generation against C++ stuff.
- Autogen / autoverify
winapi
to relieve stress on the bunny? *.winmd
stuff is cool but complicated as heck to use
Crate | Desc |
---|---|
winapi |
hand-authored bindings |
windows |
semi-generated bindings |
winmd |
(abandoned?) *.winmd parser |
windows_reader |
*.winmd parser (poorly documented) |
? | Category | Notes |
---|---|---|
interfaces | ||
methods | No signature information, STDCALL[_] marked only |
|
structs | Must have the form typedef struct ... { ... } ...; |
|
functions | WINAPI marked only |
|
unions | Must have the form typedef union ... { ... } ...; |
|
enums | Must have the form typedef enum ... { ... } ...; |
|
❌ | flags | |
❌ | constants | |
❌ | macros | |
❌ | namespaces |
- Bitfields are not (yet?) supported
- Anonymous interior structs/unions are not (yet?) supported
- Preprocessor
#if ... #endif
junk within types is not (yet?) supported
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
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.