[Migrated] Drop the constraint "only plain slices are supported as unsized types"
Open
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/878
Old labels: t: enhancement,s: qptr may fix
Originally creatd by molikto on 2022-06-04T07:56:52Z
basically is it possible to have
#[repr(transparent)]
pub struct Test([u32]);
#[spirv(compute(threads(8, 8)))]
pub fn entry(
#[spirv(storage_buffer, descriptor_set = 0, binding = 0)] data: &Test,
) {
}
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 from the compiler validation that rejects unsized types unless they are plain slices; the issue provides no file or test path. Use the shown #[repr(transparent)] Test([u32]) storage-buffer entry point as the acceptance case, and consider the work done when this wrapper is accepted without that constraint.
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
- 25/100