diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f573c09d1..f144829109 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -201,6 +201,12 @@ By @brodycj in [#6924](https://github.com/gfx-rs/wgpu/pull/6924). - Improve efficiency of dropping read-only buffer mappings. By @kpreid in [#7007](https://github.com/gfx-rs/wgpu/pull/7007). +### Performance + +#### Naga + +- Replace `unicode-xid` with `unicode-ident`. By @CrazyboyQCD in [#7135](https://github.com/gfx-rs/wgpu/pull/7135) + ### Documentation - Improved documentation around pipeline caches and `TextureBlitter`. By @DJMcNab in [#6978](https://github.com/gfx-rs/wgpu/pull/6978) and [#7003](https://github.com/gfx-rs/wgpu/pull/7003). diff --git a/Cargo.lock b/Cargo.lock index ac0a215b6d..327137d009 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2353,7 +2353,7 @@ dependencies = [ "strum 0.26.3", "termcolor", "thiserror 2.0.11", - "unicode-xid", + "unicode-ident", ] [[package]] diff --git a/naga/Cargo.toml b/naga/Cargo.toml index 9cd92d1318..4458405bbf 100644 --- a/naga/Cargo.toml +++ b/naga/Cargo.toml @@ -54,7 +54,7 @@ spv-out = ["dep:spirv"] wgsl-in = [ "dep:hexf-parse", "dep:strum", - "dep:unicode-xid", + "dep:unicode-ident", "indexmap/std", "compact", ] @@ -97,7 +97,7 @@ serde = { version = "1.0.217", features = [ petgraph = { version = "0.7", optional = true } pp-rs = { version = "0.2.1", optional = true } hexf-parse = { version = "0.2.1", optional = true } -unicode-xid = { version = "0.2.6", optional = true } +unicode-ident = { version = "1.0", optional = true } [build-dependencies] cfg_aliases.workspace = true diff --git a/naga/src/front/wgsl/parse/lexer.rs b/naga/src/front/wgsl/parse/lexer.rs index 0b0b6edebc..d55720972e 100644 --- a/naga/src/front/wgsl/parse/lexer.rs +++ b/naga/src/front/wgsl/parse/lexer.rs @@ -191,12 +191,12 @@ const fn is_blankspace(c: char) -> bool { /// Returns whether or not a char is a word start (Unicode XID_Start + '_') fn is_word_start(c: char) -> bool { - c == '_' || unicode_xid::UnicodeXID::is_xid_start(c) + c == '_' || unicode_ident::is_xid_start(c) } /// Returns whether or not a char is a word part (Unicode XID_Continue) fn is_word_part(c: char) -> bool { - unicode_xid::UnicodeXID::is_xid_continue(c) + unicode_ident::is_xid_continue(c) } #[derive(Clone)]