Shared runtime packages used by the independently published command modules.Version 0.6.0 adds a package-version argument to the public gzip runner,standardizes checksum help/version output, and exposes standalone metadataoptions in the shared command catalog. Version 0.5.0 added checked 64-bit TZif/POSIX timezoneconversion and a public-AST jq string-slice adapter, using released MoonJQ 0.2.0.It retains the shared incremental MD5/SHA-1/SHA-512, C-byte regular-expressionadaptation and gzip stream codecs. Earlier command packages continue to usetheir published core-compatible versions.
Version 0.8.0 provides the stream and matcher implementation below. Itsline scanner reuses a 64 KiB read buffer and searches only unconsumed bytes.Only a record spanning reads needs accumulation; returned lines own their bytes.The comm, cut, head, join, jq, nl, paste, sed, sort, uniq and xxd modules selectthis core coordinate for that implementation.Cp selects the same coordinate for reusable 64 KiB new-file copying. Mv alsoselects core 0.8.0, but moves entries with rename and has no copy-and-deletefallback.
gzipops.encode accepts an optional level argument, defaulting to six, forthe private pure MoonBit 32 KiB LZ and stored/fixed/dynamic Huffman encoder.Levels one through nine control search effort; existing callers retain thedefault. Input is processed in 64 KiB chunks with bounded history.gzipops.decode_reader streams gzip envelopes and DEFLATE through 64 KiBinput/output buffers and bounded Huffman tables. The output buffer also retainsthe last 32 KiB needed for backreferences, avoiding a separate history copy. Existingdecode(Bytes, ...) callers retain their supplied bytes. The G1 report recordsGNU interoperability and selected size results; performance acceptance remainspending. Command modules retain their declared core coordinates.
Core 0.8.0 parses C-byte BRE/ERE patterns once in bytere. findretains Hit captures; find_span returns offsets without allocating capturestrings and omits capture state when no backreference can observe it. Ordinaryexpressions use ordered Thompson threads. Capturing searches retain distincttag states; backreferences use an explicit stack and can require exponentialresources. The optional grep_syntax selects GNU grep's literal malformed-EREinterval and unmatched-right-parenthesis rules; the default retains sed'sstricter grammar. ignore_case expands ASCII literals/classes before classnegation and compares backreferences without changing captured output bytes.No matching-step limit is imposed. Repeated nullable captures use GNU candidateselection: candidate spans determine the endpoint, followed by capture-registerrestoration. Counted repeats, nested captures and multiple references are coveredby independent GNU comparisons. is_match retains candidate pruning withoutrestoring output registers, as GNU csplit and sed regex addresses do.See the development report.
Core 0.8.0 retains async 0.22.5 and the transfer profile introduced inversion 0.7.0, including public EmptyReplyFailure, PartialBodyFailure,ReceiveFailure and RewindFailure classifications,OutputStarted path/offset observations, and resume_skip_existing for callersthat retain an already delivered prefix. Public TransferProfile defaults toStrictProfile; command callers select CurlProfile or WgetProfile for thefixed oracle's differing EOF and output behavior. TransferFailureContext records thetransfer phase, known response framing, bytes exposed by the reader and bytesfrom completed output writes. A failed write marks its additional effects asuncertain because the public writer cannot report a partially completed write.The pure MoonBit HTTP/1 adapter uses a fresh public client's passthrough modeafter connection/TLS/proxy establishment. It completes origin request writesbefore parsing headers, distinguishes Request from ResponseHeaders, detectsan empty reply and delivers chunk payload before later framing validation.Proxy CONNECT remains on async's high-level connection path. Ordinary repeatedrequest-header option semantics remain project work; no new byte or list APIis required to implement them. Protocol lines are bounded to 64 KiB, cumulativeheaders to 1 MiB, fields to 1024 per block, interim responses to 128 and trailerfields to 1024, with explicit rejection regressions.The command profiles also distinguish request-target handling: curl rejectsraw ASCII space/TAB/CR/LF/DEL in initial paths and queries before connecting,while Wget percent-encodes them. Encoded bytes remain encoded. Redirect spacesuse curl's path %20/query + policy or Wget's %20 policy; TAB uses %09.Final Set-Cookie fields retain their names, values and order for responseobservers, separately from parsed cookie storage and with HTTP optionalwhitespace normalized. Both commands ignore fields without =. NonnumericMax-Age deletes the matching curl cookie but leaves Wget's old cookie intact;positive decimal overflow retains curl's replacement under its 400-day cap,whereas Wget expires the matching cookie for numeric overflow below 32 digits.Cookie ordering is profile-specific; the shared transfer documentation recordsthe ordering and expiry bounds without claiming cookie-jar byte parity.Ordinary curl file output opens on first payload or successful completion and uses a4096-byte buffer. A network failure remains primary if flushing its pendingtail also fails; the context still records uncertain write effects. An earlierfile write failure remains an output failure. Stdout buffering is outside thiscalibrated file profile. Valid Content-Disposition names on 2xx/3xx responses inCurlProfile instead create exclusively before body delivery, preserving an existing selected pathon failure. The curl command resets an opened regular file before an acceptedretry, retains its selected filename and applies requested cleanup only afterfinal failure. Path-based reset does not guarantee retained descriptor/inodeidentity under pathname replacement; see the transfer profile.Both command profiles accept EOF after complete 200status and unfinished headers, retaining already parsed framing checks. Wgetalso accepts EOF in chunk payload or trailers, but rejects missing chunk-sizeor completed-chunk separators. Its 416 handling does not open transfer outputregardless of Range metadata or resume state; command-level aggregate-fileinitialization remains separate. A complete known-length 200 shorter than an existingresume prefix preserves it. These command profiles leave strict default behavior intact.Curl redirects that must replay already uploaded stdin report RewindFailurein the request phase; a separate retry-all attempt can read the now-empty stdin.Header and chunk-edge contracts require fresh execution and fixed-oracleverification; full HTTP parity is not claimed.Native/Wasm, fixed-oracle and published-consumer acceptance requires separateevidence in the support record.
This module is published as cli/core and is an implementation dependency forcli/<command> modules. The portable filesystem layer exposes file-kind andregular-file-size reads, atime/mtime/ctime timestamps, access checks, andsymbolic-link creation on Native/Wasm. It also centralizes nanosecond comparison,age buckets, update/backup decisions, and preflighted copy traversal. Permissionreads, arbitrary timestamp setters, hard links, readlink, special-file creation,remain unavailable in both the historical async 0.22.4 baseline and the currentasync 0.22.5 dependency. POSIX EXDEV classification uses theactual host platform; it does not provide metadata-preserving cross-devicecopying. Existing-file copy overwrite is rejected, and new-file copying mustexplicitly select --no-preserve=mode.
Async 0.22.5 repairs Native Windows rename of symlinks/junctions. Wasm uses theinstalled host implementation, so mv retains a Windows Wasmlink-rename boundary until that host and its link/referent behavior are verified.No host program or native stub implements a command workaround.