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.4 kB · 55 lines
at main
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556.{ .name = .collate, .version = "0.3.0", .fingerprint = 0xcc3c6e4cfabde42e, .minimum_zig_version = "0.17.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. This commit is uucode's `main`, // on Zig 0.17.0 and Unicode 18.0.0. .uucode = .{ .url = "git+https://github.com/jacobsandlund/uucode.git#1fb73433bba5d93366c57f23ff2e9d7939746500", .hash = "uucode-0.2.0-ZZjBPm6FVgBcY-79AHV8ckQj86z0JwOyVyj89VeZrEiv", }, // The UCA conformance suite, UTS #10 section 12.2: four files, of // which `zig build test-conformance` reads the two `_SHORT` ones. // 212,066 cases apiece, 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/18.0.0/uca/CollationTest.zip", .hash = "N-V-__8AAEP9lAINBY48VOI7s6iNDUKUuhJldqEQ0gaDrX9c", .lazy = true, }, .cldr = .{ .url = "https://github.com/unicode-org/cldr/archive/refs/tags/release-49-beta4.tar.gz", .hash = "N-V-__8AAJqXhxrnN3B5TYOmPh0UEuVxxw7k0h-HMfnoXc80", }, }, .paths = .{ "build.zig", "build.zig.zon", "data", "src", "tests", "tools", "DESIGN.md", "LICENSES", "README.md", "REUSE.toml", },}