contextfree / winrt-rust

Use and (eventually) make Windows Runtime APIs with Rust
Apache License 2.0
142 stars 10 forks source link

Some APIs from the Windows SDK 10.0.16299 are missing #58

Closed vanderlokken closed 5 years ago

vanderlokken commented 5 years ago

The Windows SDK 10.0.16299 includes some APIs which are missing from the Rust bindings. Specifically the stuff from the windows::web::ui::interop namespace. Is this intentional? I tried to use the C# generator application and it produced sources which contain missing APIs. Is there any reason to exclude them from the crate?

Boddlnagg commented 5 years ago

When you run the generator yourself and there are APIs that are not checked in, it means that they weren't there when I last ran the generator. I have now published version 0.5.1 which includes those new APIs.

In general, solving #50 would allow us to run the generator always on the machine where the library is used, so you could also choose which SDK version you want to target. I don't know if this is always the best thing to do (i.e. if someone is building winrt-rust as a dependency, it might not be the right thing to expect them to have the correct SDK installed) ... we should look into how it's handled in C++/WinRT.

vanderlokken commented 5 years ago

Great! Thank you for the new version. This will help a lot.

And I don't think it's a good idea to run the generator application during the build process. This leads to non-deterministic outcomes, because users will have an arbitrary version of the SDK installed. Generally builds should be reproducible.

Boddlnagg commented 5 years ago

Referencing #21 concerning the question about when to run the generator.