You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,8 @@
9
9
10
10
A Lua 5.5 interpreter written in pure Rust. Faithfully ported from the official C Lua source code architecture — register-based VM, incremental/generational GC, string interning — and **passes the official Lua 5.5 test suite** (`all.lua` — 28/30 test files, 435 unit tests).
11
11
12
+
Lua strings in luars are stored as byte strings with an optional UTF-8 text view. At the Lua level this matches Lua's byte-oriented string semantics; on the Rust side you can choose `as_str()` for text or `as_bytes()` / `create_bytes()` when exact bytes matter.
13
+
12
14
## Highlights
13
15
14
16
-**Lua 5.5** — compiler, VM, and standard libraries implement the Lua 5.5 specification
@@ -236,7 +249,7 @@ For the full list of behavioral differences, see [docs/Different.md](docs/Differ
236
249
-**No C API / C module loading** — pure Rust, no `lua_State*` interface
237
250
-**No debug hooks** — `debug.sethook` is a stub; `getinfo` / `getlocal` / `traceback` work
238
251
-**Own bytecode format** — `string.dump` output is not compatible with C Lua
239
-
-**UTF-8 strings** — no arbitrary binary bytes (use the separate `binary` type)
252
+
-**Rust text view is explicit** — Lua strings are byte strings, but Rust-side `as_str()` only succeeds for valid UTF-8; use `as_bytes()` for exact byte access
0 commit comments