-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add interface
macro to define COM interfaces locally
#1486
Comments
Reopening as this issue still needs a lot of work. |
A few initial issues with the
|
@kennykerr I can work on fixing those issues. There's only one I'm unsure about: The reason I opted for What's more is that we already bring
So, I think instead we should consider using I also think we should consider using |
Sounds great - there's also less reason to use |
I also noticed that the |
@kennykerr I believe this issue can be closed now that the
Note: there was a point above about not needing to use |
While I'm working on #1093 and #1094 for complete API and component authoring support, some projects need to implement COM interfaces that are not necessarily described by Windows metadata and don't necessarily warrant public API definitions. A project might just want to implement some locally defined COM interface for interop with another private component.
I recently overhauled the windows crate's
implement
macro to rely on traits rather than metadata (#1345). What that means is that we could conceivably define interfaces directly in Rust, via a newinterface
macro, and then have theimplement
macro implement them and never actually touch any metadata from start to finish. At that point thewindows
crate could do everything thecom
crate currently does.implement
proc macro can define the necessary types that theimplement
macro could simply consume and implement (as if it had come from the pre-generated bindings).windows-bindgen
produces and theimplement
macro produces. Theimplement
macro should not care or be able to tell the difference.Perhaps something like this:
The text was updated successfully, but these errors were encountered: