jantimon / next-yak

🦀 Zero-runtime CSS-in-JS powered by Rust. Write styled-components syntax, get build-time CSS extraction and full RSC compatibility
https://yak.js.org
139 stars 4 forks source link

Replace MurmurHash with Rust's DefaultHasher for CSS identifiers #198

Closed jantimon closed 3 weeks ago

jantimon commented 3 weeks ago

Replace our custom MurmurHash2 implementation with Rust's built-in DefaultHasher (SipHash-1-3) for generating CSS identifiers

Key Changes:

For example, hashes now look like:

- y_17k2ec6  // old format (base36)
+ yupb5bt    // new format (base62, starts with letter)

This change prepares us for implementing unique class name generation once Next.js adds support for global styles inside PostCSS CSS module files