WebAssembly / WebAssembly/wasi-webgpu
GPUCompilationMessage Using UTF-16
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 220
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
The WebGPU spec expects GPUCompilationMessage.linePos/offset/length to be in UTF-16 (source). That makes perfect sense for JavaScript where all strings are UTF-16, including the WGSL strings.
In the case of wasm/wasi we don't know what language the user is going to be using, so assuming UTF-16 seems like a bad idea.
webgpu.h and wgpu both just use bytes (i.e. UTF-8 code units) instead. Should we opt for bytes as well?
Contributor guide
No contributing guide indexed for this repository
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 with the WebGPU specification section linked for GPUCompilationMessage.linePos, offset, and length, then compare the corresponding definitions in webgpu.h and wgpu/src/api/shader_module.rs. Determine which unit representation the WASI API should expose and document the decision and its compatibility implications.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100