gfx-rs / wgpu-native

Native WebGPU implementation based on wgpu-core
Apache License 2.0
885 stars 105 forks source link

include webgpu.yml on packaging #435

Closed ygdrasil-io closed 1 month ago

ygdrasil-io commented 1 month ago

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

eliemichel commented 1 month ago

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

almarklein commented 1 month ago

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

ygdrasil-io commented 1 month ago

"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 commented 1 month ago

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).

almarklein commented 1 month ago

Thanks!