contextfree / winrt-rust

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

Can we hide `ComPtr` from the public API? #79

Closed Boddlnagg closed 4 years ago

Boddlnagg commented 5 years ago

This would mean that publicly visible types such as IInspectable would refer to what's currently ComPtr<IInspectable>. Where we currently have references &IInspectable, we would then have effectively &ComPtr<IInspectable>, I don't know if that's a problem. The ABI representation is the same.

Boddlnagg commented 5 years ago

I have been doing some rather successful experiments in a branch: https://github.com/Boddlnagg/winrt-rust/tree/cleanup

contextfree commented 5 years ago

What's left to do to get that branch ready to be merged? Can you use any help?

Boddlnagg commented 5 years ago

The "problem" is that it's based on the 2018 edition branch (see https://github.com/contextfree/winrt-rust/pull/74) and I wanted to make a release with some other changes before merging that.

Boddlnagg commented 5 years ago

So I did release 0.6.0, merged the 2018 edition change, rebased this branch and opened a PR for it: #80

contextfree commented 5 years ago

Sweet, thanks! I'm trying this out on a Windows.UI.Composition sample I've been working on in case you want more testing/validation, though don't mean to suggest you should hold up merging whenever you think it's ready.