Skip to content
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

Preserve original API case #646

Merged
merged 2 commits into from
Mar 25, 2021
Merged

Preserve original API case #646

merged 2 commits into from
Mar 25, 2021

Conversation

kennykerr
Copy link
Collaborator

@kennykerr kennykerr commented Mar 25, 2021

Originally, the winrt-rs crate transformed API names to appear more idiomatic in Rust. However with the addition of Win32 and COM APIs in the windows-rs crate, it became increasingly difficult to continue to provide that transformation as many Win32 and COM APIs do not lend themselves to this kind of transformation. Increasingly, this has become a tax for a number of reasons.

  • There are a long list of suboptimal snake_case conversions that cannot easily be handled. (Suboptimal snake_case conversion in some cases #112)
  • The conversion is lossy, making it difficult to support API authoring in Rust. (Defining and Implementing Win32/COM/WinRT types in Rust #81)
  • It is much harder to port Windows code from other languages.
  • It is much harder to find documentation for Windows APIs when the names aren't searchable.
  • This project attempts to treat all Windows APIs alike, and having different conventions for Win32 and WinRT is really confusing.

This is going to be a little painful for existing code using the windows crate - creating this PR was a bit tedious - but in the long run I believe this will provide the best experience, and the sooner the better. Now that my focus is shifting to #81 this is really essential.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant