LaughingMan dff3111485 WGSL front end: Fix panic on invalid input
Until now the WGSL parser would interpret a character index as a byte index.
This could lead to a panic on invalid input strings like "\"\u{2}ПЀ\u{0}\"",
because it would use that index to slice a string without ensuring the slicing
happens on a character boundary.

One possible fix would have been to call `str::find` instead of `position`,
however by relying on `splitn` instead of slicing a str manually it is
easier to convince ourselves that this code can no longer panic.

Fixes https://github.com/gfx-rs/naga/issues/90
2020-07-03 10:01:38 -04:00
2020-06-09 13:43:16 -04:00
2020-07-01 08:53:54 -04:00
2020-07-02 00:20:00 -04:00
2020-06-21 16:59:16 -04:00

Naga

Matrix Crates.io Docs.rs Build Status

This is an experimental shader translation library for the needs of gfx-rs project and WebGPU.

Supported end-points

Front-end Status Notes
SPIR-V (binary) 🚧
WGSL 🚧
GLSL (Vulkan) 🚧
Rust
Back-end Status Notes
SPIR-V (binary) 🚧
WGSL
Metal 🚧
HLSL
GLSL
AIR
DXIR
DXIL
DXBC
Description
No description provided
Readme 137 MiB
Languages
Rust 79.9%
WGSL 16.2%
HLSL 2%
GLSL 1.7%
JavaScript 0.2%