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

Win32Metadata support #8

Open
atynagano opened this issue Mar 17, 2022 · 8 comments
Open

Win32Metadata support #8

atynagano opened this issue Mar 17, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@atynagano
Copy link

I opened the issue that requests DirectStorage support on win32metadata project. The contributor said it is needed that DirectStorage team produce its metadata. I think it would be helpful to generate language bindings.

@damyanp damyanp added the enhancement New feature or request label Mar 17, 2022
@damyanp
Copy link
Member

damyanp commented Mar 17, 2022

We don't have a plan to do this in the short term, however we'd gladly consider a pull request to this repo that generates the win32metadata from dstorage.h/dstorageerr.h.

The request is noted. I, personally, am pretty keen on getting rust bindings for these via win32metadata, so this might be something I do in my spare time.

@shuffle2
Copy link

shuffle2 commented Oct 23, 2022

Is there a way to get the DirectStorage SDK besides nuget? For one, I would like such a thing for c++ development, however I'm not sure how that would be compatible with rust (which I would also be interested in), either.
I see it's also in vcpkg (which just uses the nuget package)...but really, why is this not in a "mainline" windows sdk? How do you envision it being used by rust projects? I doubt that a random 3rd party can legally repackage the directstorage headers/libs into a *-sys crate...

https://www.nuget.org/packages/Microsoft.Direct3D.DirectStorage/1.0.2/License

    b)  Distribution Requirements. For any code you distribute, you must:
        i.  add significant primary functionality to it in your applications; 

@damyanp
Copy link
Member

damyanp commented Oct 24, 2022

Thanks for the feedback, I'm going to try find an answer to the "can a third party redistribute the dlls in a rust crate" (or other packaging system) question. This is certainly a scenario we want to enable.

The easiest way to use a nuget package, if you don't want to use nuget or vcpkg directly, is to just unzip the nuget file (these are just zip files with a different extension) and use it from there.

@MarijnS95
Copy link

@damyanp are there still plans to get these bindings into the Windows SDK - and as such into win32metadata - or is the .winmd in the NuGet package all that's available for now?

@damyanp
Copy link
Member

damyanp commented Jan 2, 2024

There are currently no plans to add the DirectStorage headers to the Windows SDK. However, the nuget package does include the windmds, and the header files are now under the MIT license.

@MarijnS95
Copy link

@damyanp thanks, but the winmd itself is not code, and is also not in distributable_files.txt, meaning that a user-crate is not allowed to carry this file around?

@damyanp
Copy link
Member

damyanp commented Jan 3, 2024

For all intents and purposes the winmd file is equivalent to the header file. We can see about finding some way to more explicitly explain this in the license.

I'd imagine that any user crate would need to download the dlls anyway to be useful, so I wonder if the winmd needs to be included in the crate anyway?

@MarijnS95
Copy link

@damyanp that'd be appreciated, as the winmd files are definitely binary.


Not exactly sure. For a Rust crate we'd need the .lib at build/compile time (Rust crates are distributed as source code), and the .dll at runtime, and there's not always a consensus whether the API wrapper crate or the crate consumer should provide these.

However, we don't need the winmd in the crate; only in the git repo (for convenience) to generate Rust source code that is checked in to the repo and published as a crate (so that the end-user has minimal dependencies, for what ends up being a 2k-2.5k generated bindings file).

Note that it's not my crate, so any of this is better discussed with the actual author.


Besides, I've filed #38 and am inclined to generate a .winmd locally to have improved bindings and dodge the licensing complexity.

MarijnS95 added a commit to MarijnS95/direct-storage-rs that referenced this issue Jan 16, 2024
The winmd shipped with the NuGet package has an [indecisive license][1],
as it's intended to fall under the MIT license just like other code
files, but is strictly a binary blob.  At the same time the metadata
[isn't representing the headers as conveniently and completely][2] as
we'd like in our Rust bindings, but unfortunately there is no upstream
source available to reference or contribute to, where we can tweak and
improve how the NuGet `winmd` is generated.

The metadata description introduced here tries to reproduce the original
metadata as closely as possible, while following the improvements
[that I requested upstream][2] and [maintaining the `int` type for
`DSTORAGE_DEBUG`][3].

[1]: microsoft/DirectStorage#8 (comment)
[2]: microsoft/DirectStorage#38
[3]: microsoft/win32metadata#1822 (comment)
MarijnS95 added a commit to MarijnS95/direct-storage-rs that referenced this issue Jan 17, 2024
The winmd shipped with the NuGet package has an [indecisive license][1],
as it's intended to fall under the MIT license just like other code
files, but is strictly a binary blob.  At the same time the metadata
[isn't representing the headers as conveniently and completely][2] as
we'd like in our Rust bindings, but unfortunately there is no upstream
source available to reference or contribute to, where we can tweak and
improve how the NuGet `winmd` is generated.

The metadata description introduced here tries to reproduce the original
metadata as closely as possible, while following the improvements
[that I requested upstream][2] and [maintaining the `int` type for
`DSTORAGE_DEBUG`][3].

[1]: microsoft/DirectStorage#8 (comment)
[2]: microsoft/DirectStorage#38
[3]: microsoft/win32metadata#1822 (comment)
MarijnS95 added a commit to MarijnS95/direct-storage-rs that referenced this issue Jan 17, 2024
The winmd shipped with the NuGet package has an [indecisive license][1],
as it's intended to fall under the MIT license just like other code
files, but is strictly a binary blob.  At the same time the metadata
[isn't representing the headers as conveniently and completely][2] as
we'd like in our Rust bindings, but unfortunately there is no upstream
source available to reference or contribute to, where we can tweak and
improve how the NuGet `winmd` is generated.

The metadata description introduced here tries to reproduce the original
metadata as closely as possible, while following the improvements
[that I requested upstream][2] and [maintaining the `int` type for
`DSTORAGE_DEBUG`][3].

[1]: microsoft/DirectStorage#8 (comment)
[2]: microsoft/DirectStorage#38
[3]: microsoft/win32metadata#1822 (comment)
MarijnS95 added a commit to MarijnS95/direct-storage-rs that referenced this issue Jan 17, 2024
The winmd shipped with the NuGet package has an [indecisive license][1],
as it's intended to fall under the MIT license just like other code
files, but is strictly a binary blob.  At the same time the metadata
[isn't representing the headers as conveniently and completely][2] as
we'd like in our Rust bindings, but unfortunately there is no upstream
source available to reference or contribute to, where we can tweak and
improve how the NuGet `winmd` is generated.

The metadata description introduced here tries to reproduce the original
metadata as closely as possible, while following the improvements
[that I requested upstream][2] and [maintaining the `int` type for
`DSTORAGE_DEBUG`][3].

[1]: microsoft/DirectStorage#8 (comment)
[2]: microsoft/DirectStorage#38
[3]: microsoft/win32metadata#1822 (comment)
MarijnS95 added a commit to MarijnS95/direct-storage-rs that referenced this issue Jan 17, 2024
The winmd shipped with the NuGet package has an [indecisive license][1],
as it's intended to fall under the MIT license just like other code
files, but is strictly a binary blob.  At the same time the metadata
[isn't representing the headers as conveniently and completely][2] as
we'd like in our Rust bindings, but unfortunately there is no upstream
source available to reference or contribute to, where we can tweak and
improve how the NuGet `winmd` is generated.

The metadata description introduced here tries to reproduce the original
metadata as closely as possible, while following the improvements
[that I requested upstream][2] and [maintaining the `int` type for
`DSTORAGE_DEBUG`][3].

[1]: microsoft/DirectStorage#8 (comment)
[2]: microsoft/DirectStorage#38
[3]: microsoft/win32metadata#1822 (comment)
MarijnS95 added a commit to MarijnS95/direct-storage-rs that referenced this issue Jan 17, 2024
The winmd shipped with the NuGet package has an [indecisive license][1],
as it's intended to fall under the MIT license just like other code
files, but is strictly a binary blob.  At the same time the metadata
[isn't representing the headers as conveniently and completely][2] as
we'd like in our Rust bindings, but unfortunately there is no upstream
source available to reference or contribute to, where we can tweak and
improve how the NuGet `winmd` is generated.

The metadata description introduced here tries to reproduce the original
metadata as closely as possible, while following the improvements
[that I requested upstream][2] and [maintaining the `int` type for
`DSTORAGE_DEBUG`][3].

[1]: microsoft/DirectStorage#8 (comment)
[2]: microsoft/DirectStorage#38
[3]: microsoft/win32metadata#1822 (comment)
MarijnS95 added a commit to MarijnS95/direct-storage-rs that referenced this issue Jan 22, 2024
The winmd shipped with the NuGet package has an [indecisive license][1],
as it's intended to fall under the MIT license just like other code
files, but is strictly a binary blob.  At the same time the metadata
[isn't representing the headers as conveniently and completely][2] as
we'd like in our Rust bindings, but unfortunately there is no upstream
source available to reference or contribute to, where we can tweak and
improve how the NuGet `winmd` is generated.

The metadata description introduced here tries to reproduce the original
metadata as closely as possible, while following the improvements
[that I requested upstream][2] and [maintaining the `int` type for
`DSTORAGE_DEBUG`][3].

[1]: microsoft/DirectStorage#8 (comment)
[2]: microsoft/DirectStorage#38
[3]: microsoft/win32metadata#1822 (comment)
hasenbanck pushed a commit to Tsukisoft/direct-storage-rs that referenced this issue Jan 26, 2024
The winmd shipped with the NuGet package has an [indecisive license][1],
as it's intended to fall under the MIT license just like other code
files, but is strictly a binary blob.  At the same time the metadata
[isn't representing the headers as conveniently and completely][2] as
we'd like in our Rust bindings, but unfortunately there is no upstream
source available to reference or contribute to, where we can tweak and
improve how the NuGet `winmd` is generated.

The metadata description introduced here tries to reproduce the original
metadata as closely as possible, while following the improvements
[that I requested upstream][2] and [maintaining the `int` type for
`DSTORAGE_DEBUG`][3].

[1]: microsoft/DirectStorage#8 (comment)
[2]: microsoft/DirectStorage#38
[3]: microsoft/win32metadata#1822 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants