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

Migrate to Microsoft's com-rs #35

Merged
merged 1 commit into from
Apr 12, 2023
Merged

Migrate to Microsoft's com-rs #35

merged 1 commit into from
Apr 12, 2023

Conversation

MarijnS95
Copy link
Member

@MarijnS95 MarijnS95 commented Jan 31, 2022

Fixes #23, fixes #28, closes #36

The com-rs crate is deprecated, but Microsoft published their vetted and maintained replacement as com. This crate has much better helpers and doesn't pull in the libuuid library that isn't available on Android nor Mac.

Unfortunately there is still no verdict how this crate relates to the windows-rs iniative, where the entire FFI API is autogenerated from metadata, nor has it been possible to bring in Linux support thus far. As such we'll stick with Microsoft's com for now which is already a step in the right direction.

Note that we'll have to figure out a cleaner solution to get a stack-allocated, temporary class allocation for the include handler: one that is only allowed to live as long as the surrounding function, instead of endlessly on the heap.

src/intellisense/wrapper.rs Show resolved Hide resolved
src/wrapper.rs Show resolved Hide resolved
src/wrapper.rs Outdated Show resolved Hide resolved
src/wrapper.rs Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
src/wrapper.rs Outdated Show resolved Hide resolved
@MarijnS95 MarijnS95 self-assigned this Feb 14, 2022
@MarijnS95
Copy link
Member Author

We won't be merging this as com-rs is now officially deprecated, unmaintained, and calls for windows-rs to be its replacement/successor. Called this out a few times but it's not yet compatible with Linux, but this time we might actually get there™.

Will leave this open until that's all done and we can start the migration process again, will likely use this PR as a base for it.

@MarijnS95 MarijnS95 marked this pull request as draft June 28, 2022 09:01
The `com-rs` crate is deprecated, but Microsoft published their vetted
and maintained replacement as `com`.  This crate has much better helpers
and doesn't pull in the `libuuid` library that isn't available on
Android nor Mac.

Unfortunately there is still no verdict how this crate relates to the
windows-rs iniative, where the entire FFI API is autogenerated from
metadata, nor has it been possible to bring in Linux support thus far.
As such we'll stick with Microsoft's `com` for now which is already a
step in the right direction.

Note that we'll have to figure out a cleaner solution to get a
stack-allocated, temporary class allocation for the include handler: one
that is only allowed to live as long as the surrounding function,
instead of endlessly on the heap.
@MarijnS95 MarijnS95 marked this pull request as ready for review March 28, 2023 21:14
@MarijnS95
Copy link
Member Author

I'm fine merging this now. Even though com-rs is deprecated, com_rs is in a worse spot quality and usability-wise (not widely cross-platform because of libuuid dependency) and windows-rs won't "ever™" work for us since we didn't get anywhere as previously hoped for.

@Jasper-Bekkers Jasper-Bekkers merged commit dd0f522 into main Apr 12, 2023
@MarijnS95 MarijnS95 deleted the ms-com-rs branch April 12, 2023 10:39
@Jasper-Bekkers Jasper-Bekkers restored the ms-com-rs branch November 1, 2023 13:41
@tosti007 tosti007 deleted the ms-com-rs branch May 28, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Replace com-rs dependency with com Linking fails on MacOSX (missing -luuid)
2 participants