wgsl-tooling-wg / wesl-spec

A portable and modular superset of WGSL
BSD 3-Clause "New" or "Revised" License
41 stars 3 forks source link

Tough issues #3

Open stefnotch opened 4 months ago

stefnotch commented 4 months ago
stefnotch commented 3 months ago

Regarding mangling, this is what we currently have

  • Mangling everything and exposing them that way. Names would look like bevy__pbr_lighting_some__constant. Name mangling becomes part of the specification.

  • Requiring that everything is re-exported from the root module. Names would be short. Potentially very verbose and repetitive root modules.

  • Generating a bindings map. It would look like { "bevy_pbr::lighting::some_constant": "mangled name goes here" }. Bindings map is required for using the generated .wgsl.

  • each linker exposes a small library to mangle/unmangle names according to linker specifics from ncthbrt

mighdoll commented 3 months ago

re: mangling, another option:

mighdoll commented 2 months ago

How 'bout we make new issues for each of the remaining tough issues listed above? (and close this one).

stefnotch commented 2 months ago

Sounds good