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

include webgpu.yml on packaging #435

Merged

Conversation

ygdrasil-io
Copy link
Contributor

Related to #433.
I created a mock version to test the packaging : https://github.com/ygdrasil-io/wgpu-native/releases/tag/v0.0.0.7

Included webgpu.yml file in the distribution process to ensure specifications are packaged alongside other required files. This change guarantees that all necessary resources are available during deployment and usage.
Added a command in the Makefile to create the `specifications` directory during the archive preparation phase. This ensures the directory is available for subsequent steps that may require it.
@eliemichel
Copy link
Contributor

Nice addition, I only wonder whether "specifications" (plural) is the best wording.

@almarklein
Copy link
Collaborator

Maybe just put it next to the .h file? Or in the root?

@ygdrasil-io
Copy link
Contributor Author

"There are only two hard things in Computer Science: cache invalidation and naming things."
-- Phil Karlton

I only added a directory to try to add semantics but the root directory is fine from my point of view.
Placing it in the "include" folder might be misleading, as this file won't be processed by a compiler.

So, root folder it is ?

@almarklein
Copy link
Collaborator

cache invalidation and naming things

Very true :)

So, root folder it is ?

Actually, I gave this some thought and I prefer we create a subdir called wgpu-native-meta, and put both the webgpu.yml and wgpu-native-git-tag in there.

The reasoning:

The purpose of the subdirs is to make it possible to extract the archive in existing projects and have everything nicely in-place.

The one file we had in the root folder was no problem, because its name is unique enough. But now we add another file, and I plan to add files that contain a hash of the lib, and who knows what we'll add later. IMO it makes sense to cleanly put them in a folder that is easily identified.

For consumers that don't care about the structure, its easy enough to flatten it (we do something like this in wgpu-py).

Renamed `specifications` directory to `wgpu-native-meta` within archive structure. Updated paths for relevant files to reflect this change for better organization and clarity.
@almarklein almarklein merged commit 716b62c into gfx-rs:trunk Oct 9, 2024
16 checks passed
@almarklein
Copy link
Collaborator

Thanks!

@ygdrasil-io ygdrasil-io deleted the feature/include-webgpu-yml-on-packaging branch October 9, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants