Skip to content

stdx 0.3.0

Latest

Choose a tag to compare

@c4milo c4milo released this 24 Nov 12:44
1df5f9f

stdx 0.3.0

This is a MINOR release (decision 65).
It adds regular expressions, Unicode's tables, and one module that names every other module. One
public name is removed: codec.Features is now platform.CpuFeatures. No encoder writes bytes
other than the ones 0.2.0 writes.

zig fetch --save git+https://github.com/c4milo/stdx#v0.3.0

Added

  • stdx: one module that names each module under its category, as std does:
    stdx.compress.gzip, stdx.hash, stdx.json and so on. A new dependent imports stdx
    alone.
  • stdx.regex: regular expressions that match in time linear in the text. It takes RFC 9485's
    grammar with RE2's anchors, groups, named groups, lazy quantifiers, flags and named classes,
    and \p{...} with Unicode's case folding. A program compiles a pattern into storage that it
    owns. A Searcher then runs the pattern in memory that the program gives (decision 86).
    A program reads its text as UTF-8, or as bytes, where ., a class and an escape such as
    \xE9 each take one byte, UTF-8 or not, and (?i) folds ASCII alone.
  • stdx.unicode: Unicode 17.0.0's general categories, scripts and simple case folding, from
    tables written from the Unicode Character Database.
  • stdx.unicode.utf8: UTF-8 (RFC 3629), which json and regex share. It holds the validator
    proved in Lean, and the bytes of one code point.
  • stdx.platform.memset and stdx.platform.memset_applies: the vector memset that a program
    may export from its root (decision 41).

Fixed

  • base64 judges a text's pad bits after every other rule of the text. A text refused for its
    pad bits alone is now one that pad_bits = .drop takes (71f40f8).
  • utf8.encode takes a code point that the build knows (44615ef).

Changed

  • The CPU's features are platform.CpuFeatures, with none, target, detect, intersect
    and with as before. codec exports no Features. A program calls
    platform.CpuFeatures.detect() once and passes the value to each codec's init
    (decisions 21 and 40 as amended, 1df5f9f).
  • No variant object holds stack-trace code of its own. A dependent that uses CRC-32, regex and
    json carries 0.67 MB of text, where it carried 2.36 MB (921bf27).

Names that moved

Each module's own name stays exported as an alias, and a later release removes the aliases.
codec.Features has no alias.

0.2.0 0.3.0
dependency.module("deflate") stdx.compress.deflate
dependency.module("zlib") stdx.compress.zlib
dependency.module("gzip") stdx.compress.gzip
dependency.module("zstd") stdx.compress.zstd
dependency.module("brotli") stdx.compress.brotli
dependency.module("checksum") stdx.hash
dependency.module("json") stdx.json
dependency.module("base64") stdx.base64
dependency.module("platform") stdx.platform