Something went wrong. Try again.
The Unicode Collation Algorithm (UTS #10) and CLDR locale tailorings in Zig: sort text the way people expect rather than by code point.
Something went wrong. Try again.
zig-collate build.zig.zon
2.3 kB · 54 lines
at zig-0.16
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455.{ .name = .collate, .version = "0.1.0", .fingerprint = 0xcc3c6e4cfabde42e, .minimum_zig_version = "0.16.0", .dependencies = .{ // The Unicode Character Database, for step 1 of the algorithm: the // canonical combining classes and canonical decomposition mappings // that NFD runs on. uucode has no normalization of its own -- it is // the data layer and not a collation -- and it is configurable at // build time, so `build.zig` names the three fields this library // reads and pays for nothing else. // // Its UCD must be the same Unicode version as the DUCET in `data/`. // Step 1 and step 2 reading different versions is the kind of // mismatch that shows up as a handful of failures a hundred thousand // lines into the conformance suite. uucode exposes no version // constant to assert against, so the two are updated together by // hand: see tools/update-ducet.sh. .uucode = .{ .url = "git+https://github.com/jacobsandlund/uucode.git#f67fa5dbef5c9de57773dbe2f7a02bebc7e20301", .hash = "uucode-0.2.0-ZZjBPvDKVAC0ZmoJJ37dlUn11y68rIKVeeovTLY9zxoQ", }, // The UCA conformance suite, UTS #10 section 12.2: four files, of // which `zig build test-conformance` reads the two `_SHORT` ones. // 208,070 and 229,860 cases, each of which must sort at or after the // line before it at identical strength. This is the acceptance // criterion for the library, not a smoke test. // // Lazy, because it is five megabytes and `zig build test` does not // need it. .collation_test = .{ .url = "https://www.unicode.org/Public/17.0.0/uca/CollationTest.zip", .hash = "N-V-__8AAPaApwKRYd_DyAK9yKfR5xnBTJdobYV1h0zhLl8W", .lazy = true, }, .cldr = .{ .url = "https://github.com/unicode-org/cldr/archive/refs/tags/release-48-2.tar.gz", .hash = "N-V-__8AALa_ihnH6G94d0T6M_-LgWwn8bCpRS5l4vGxnNOa", }, }, .paths = .{ "build.zig", "build.zig.zon", "data", "src", "tests", "tools", "DESIGN.md", "LICENSES", "README.md", "REUSE.toml", },}