[Migrated] Allow keeping linkage annotation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.4k
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/1042
Old labels: t: enhancement
Originally creatd by SiebenCorgie on 2023-04-21T16:42:49Z
SpirV allows defining import and export [0] for linking separate Shader modules [1] post compilation.
Apparently SpirV linking is already used within rust-gpu, but not exposed. Therefore we can't use extern "C" as we usually would.
This functionality would be useful, for instance when building shader permutation systems.
The enhancement would basically be allowing extern C, #[no_mangle] etc. to map to (possibly named) import/export decorated values whenever the Linkage capability on spirv-builder is enabled.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the spirv-builder Linkage capability and review the linked SPIR-V linkage specification. Trace how rust-gpu currently handles extern "C" and #[no_mangle" values, then determine the required mapping to named import/export decorations. Done means linkage annotations are preserved when Linkage is enabled and separate shader modules can use them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100