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 Mar 28, 2023
1 parent c1cf296 commit bb35536
Show file tree
Hide file tree
Showing 6 changed files with 914 additions and 724 deletions.
9 changes: 3 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@ categories = ["rendering", "rendering::graphics-api"]
include = ["src", "LICENSE"]
documentation = "https://docs.rs/hassle-rs"

[package.metadata.docs.rs]
default-target = "x86_64-pc-windows-msvc"

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

[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.9", features = ["wtypes", "oleauto", "combaseapi"] }
Expand Down
Loading

0 comments on commit bb35536

Please sign in to comment.