From f20348e9a3782ce11b4c9bee39be06fe2f6d50cd Mon Sep 17 00:00:00 2001 From: Sam Atman Date: Fri, 13 Feb 2026 10:27:30 -0500 Subject: Prerelease touchup --- NEWS.md | 3 ++- README.md | 4 ++-- build.zig | 7 ------- src/code_point.zig | 6 +++--- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/NEWS.md b/NEWS.md index 9538017..bb62e34 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,7 +10,8 @@ kept in static memory, where it should be. With compression gone in the last release, the inconvenience and startup penalty of moving the data, already present _in_ static memory, over to -the heap, was purely wasted effort. Just CPU head. So that's gone. +the heap, was purely wasted effort. Just CPU heat and extra clock time. +So that's gone. 90% of the work here was done by Jacob Sandlund, who went on to write his own rather interesting Unicode library, [uucode][uucode], which you diff --git a/README.md b/README.md index fd46cab..955414f 100644 --- a/README.md +++ b/README.md @@ -579,7 +579,7 @@ const Scripts = @import("Scripts"); test "Scripts" { // To see the full list of Scripts, look at the - // `src/Scripts.zig` file. They are list in an enum. + // `src/Scripts.zig` file. They are listed as an enum. try expect(Scripts.script('A') == .Latin); try expect(Scripts.script('Ω') == .Greek); try expect(Scripts.script('צ') == .Hebrew); @@ -621,7 +621,7 @@ the fragment (`CodePoint` uses a `u3` for length, actually). 4GiB is a lot of string. There are a few reasons to work with that much string, log files primarily, but fewer to bring it all into memory at once, and practically no reason at all to do anything to such a string -without breaking it into smaller piece to work with. +without breaking it into smaller pieces to work with. Also, Zig compiles on 32 bit systems, where `usize` is a `u32`. Code running on such systems has no choice but to handle slices in smaller diff --git a/build.zig b/build.zig index 694d887..ac3ca77 100644 --- a/build.zig +++ b/build.zig @@ -532,13 +532,6 @@ pub fn build(b: *std.Build) void { const run_unicode_tests = b.addRunArtifact(unicode_tests); - const test_unicode_step = b.step("unicode", "Rune unicode tests"); - test_unicode_step.dependOn(&run_unicode_tests.step); - test_unicode_step.dependOn(&display_width_tr.step); - test_unicode_step.dependOn(&words_tr.step); - test_unicode_step.dependOn(&norm_tr.step); - test_unicode_step.dependOn(&case_fold_tr.step); - const test_step = b.step("test", "Run all module tests"); test_step.dependOn(&run_unicode_tests.step); test_step.dependOn(&code_point_tr.step); diff --git a/src/code_point.zig b/src/code_point.zig index 5f6c61c..2332c8b 100644 --- a/src/code_point.zig +++ b/src/code_point.zig @@ -31,7 +31,7 @@ pub const CodePoint = struct { /// Use `decodeAtIndex` or `decodeAtCursor`. pub fn decode(bytes: []const u8, offset: uoffset) ?CodePoint { _ = .{ bytes, offset }; - @compileError("decode has been removed, use `decodeAtIndex`."); + @compileError("decode has been removed, use `decodeAtIndex` or `decodeAtCursor`."); } /// Return the codepoint at `index`, even if `index` is in the middle @@ -211,8 +211,8 @@ pub const Iterator = struct { // speed increase in exchange. // // Credit for the algorithm goes to Björn Höhrmann, who wrote it up at -// https://bjoern.hoehrmann.de/utf-8/decoder/dfa/ . The original -// license may be found in the ./credits folder. +// https://bjoern.hoehrmann.de/utf-8/decoder/dfa/. The license to the +// original code may be found in the ./credits folder. // /// Successful codepoint parse -- cgit v1.2.3