• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moonbitlang / core / 6259
91%

Build:
DEFAULT BRANCH: main
Ran 21 Aug 2026 04:38AM UTC
Jobs 1
Files 450
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Aug 2026 04:34AM UTC coverage: 90.775% (+0.01%) from 90.765%
6259

push

github

web-flow
feat(encoding): add hex package (#3625)

Adds moonbitlang/core/encoding/hex for in-memory lowercase hexadecimal
encoding and decoding, mirroring the per-codec granularity of the
existing encoding/{ascii,base64,utf8,utf16} packages.

Public API is deliberately minimal: encode(BytesView) -> String,
decode(StringView) -> Bytes raise Malformed, and the Malformed
suberror. decode accepts both letter cases; encode emits lowercase.
Go's EncodedLen/DecodedLen sizing helpers are intentionally left out:
encode and decode allocate their own results, so the helpers would
have no caller with a real job (the lengths are simply 2 * n and
n / 2, stated in the docs). They can return alongside buffer-writing
variants if those are ever added. Stream APIs are excluded because
core exposes no IO abstraction here.

Refreshed against current main (2026-08-21): negative-index string
slicing in a test replaced with an explicit start offset, and the
Malformed Debug promotion handled with the same deprecated pub extend
pattern encoding/base64 uses.

Codex CLI review (xhigh, two rounds): round 1 caught the encoder's
StringBuilder size_hint being expressed in output characters while the
hint is measured in BYTES on non-JS targets (2n reserved only n UTF-16
slots, forcing a growth-and-copy on every non-empty encode) — fixed to
4 * n with the unit documented; round 2 verified the fix and that
decode's byte-buffer hint was already unit-correct.

Signed-off-by: Codex CLI <codex@openai.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

19 of 19 new or added lines in 2 files covered. (100.0%)

16521 of 18200 relevant lines covered (90.77%)

307625.39 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6259.1 21 Aug 2026 04:38AM UTC 451
90.79
GitHub Action Run
Source Files on build 6259
  • Tree
  • List 450
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d3130d8c on github
  • Prev Build on main (#6257)
  • Next Build on main (#6262)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc