Skip to content

GPUCompilationMessage Using UTF-16 #66

@MendyBerger

Description

@MendyBerger

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions