Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

macros/class: Propagate cfg annotations to COM class methods - #234

Closed
Marijn Suijten (MarijnS95) wants to merge 2 commits into
microsoft:masterfrom
MarijnS95:propagate-cfg-to-class-methods
Closed

macros/class: Propagate cfg annotations to COM class methods#234
Marijn Suijten (MarijnS95) wants to merge 2 commits into
microsoft:masterfrom
MarijnS95:propagate-cfg-to-class-methods

Conversation

@MarijnS95

@MarijnS95 Marijn Suijten (MarijnS95) commented Feb 1, 2022

Copy link
Copy Markdown
Contributor

We have a very peculiar workaround for DXC (pending upstream fix solution microsoft/DirectXShaderCompiler#3793) that requires us to conditionally provide function implementations for extra vtable "spacers": https://github.com/Traverse-Research/hassle-rs/blob/f5a090c70bbcf66f3bafd3d549716a414e873838/src/wrapper.rs#L130-L139. The spacers are conditionally defined in: https://github.com/Traverse-Research/hassle-rs/blob/f5a090c70bbcf66f3bafd3d549716a414e873838/src/unknown.rs.

These need to be forwarded otherwise the initialization of these vtable members will happen unconditionally even when they don't exist: https://github.com/Traverse-Research/hassle-rs/actions/runs/1777800733

Fixes #166

@MarijnS95

Copy link
Copy Markdown
Contributor Author

Alternatively we could have that pub(crate) type IDxcUnknownShim = IUnknown; but it requires propagating the attribute on the impl instead.

@jelmansouri

Copy link
Copy Markdown

Hi! Is there any update on this PR, our game engine has a dependency in our shader building infra which is Linux only to the DirectXShaderCompiler and we use hassle-rs. Legacy non Microsoft Com library is unmaintained and still causing us issues. Having DirectXShaderCompiler + Rust working properly is important for the professional game development community which uses HLSL most of the time, especially that Rust is taking more and more it's place in the tooling side games!

@MarijnS95

Marijn Suijten (MarijnS95) commented Feb 28, 2022

Copy link
Copy Markdown
Contributor Author

Ryan Levick (@rylev) can we get a review, merge and release for #235 and this PR (#234)? That would make us able to start using com-rs in production on hassle-rs 🎉

@MarijnS95
Marijn Suijten (MarijnS95) force-pushed the propagate-cfg-to-class-methods branch from c8256cb to 07148b2 Compare March 28, 2023 20:28
@MarijnS95

Copy link
Copy Markdown
Contributor Author

Ryan Levick (@rylev) not sure if you still intend to at least merge outstanding PRs and make another release (and at also push the missing tags to this repo), but I don't really care about following up on this anymore as the upstream fix has finally made its way in, so I can use published com 0.6 now rather than this branch on a fork.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants