Skip to content

feat(lua): expose UTF-8 and integrate standard-library corrections - #1086

Merged
wolfy-j merged 4 commits into
mainfrom
feat/lua-utf8-stdlib
Nov 15, 2026
Merged

wolfy-j merged 4 commits into
mainfrom
feat/lua-utf8-stdlib

Conversation

@wolfy-j

@wolfy-j wolfy-j commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Lua processes receive cached standard libraries through BindCachedLibs, but that list omitted utf8. Code passed lint and then failed when indexing the missing global. This change builds the UTF-8 library once, makes it immutable and binds it through the same list used by ambient-module discovery.

The go-lua dependency pins merged #89–#95 at 1c19f1e6819f, including #91's iterator and offset regressions. It corrects table.concat ranges, infinity, numeric conversion, pattern-complexity errors, UTF-8 strict/lax decoding and integer results from string operations. Numeric strings and string-library counts now preserve their Lua integer subtype.

The integration audit found runtime options that accepted only floats. Text diff options and process registry scope selectors now accept both numeric subtypes. New regressions reproduce ignored diff settings and rejected registry scopes before that correction. Registry tests exercise register, scoped lookup and unregister across all four scopes with both subtypes.

Validation:

  • Full go-lua suite and checker fixture corpus pass with all six additional fixes composed; 8,026 numeric strings match reference Lua 5.4 exactly.
  • The complete runtime Lua engine and module suites pass under -race with that composition.
  • Cached-library and option regressions pass under -race against the downloaded dependency, without a local replacement.
  • UTF-8 coverage includes multibyte iteration, negative byte positions, strict/lax decoding, extended encodings, empty-string offsets and library immutability.

Documentation: wippyai/docs#58.

@wolfy-j
wolfy-j requested a review from skhaz November 15, 2026 16:51
@wolfy-j
wolfy-j requested a review from skhaz November 15, 2026 18:07
@wolfy-j
wolfy-j requested a review from skhaz November 15, 2026 18:46
@wolfy-j wolfy-j changed the title feat(lua): bind the utf8 standard library in Lua processes feat(lua): expose UTF-8 and integrate standard-library corrections Nov 15, 2026
@wolfy-j
wolfy-j requested a review from skhaz November 15, 2026 20:41
@wolfy-j
wolfy-j merged commit 6e0356c into main Nov 15, 2026
21 checks passed
@wolfy-j
wolfy-j deleted the feat/lua-utf8-stdlib branch November 15, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants