Skip to content

Commit

Permalink
Migrate to Microsoft's com-rs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MarijnS95 committed Feb 1, 2022
1 parent 5cd0485 commit f5a090c
Show file tree
Hide file tree
Showing 6 changed files with 865 additions and 650 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ default-target = "x86_64-pc-windows-msvc"

[dependencies]
libloading = "0.7.0"
com-rs = "0.2.1"
com = { version = "0.6", features = ["production"] }
bitflags = "1.2.1"
widestring = "0.5.0"
thiserror = "1.0"
Expand Down
Loading

0 comments on commit f5a090c

Please sign in to comment.