Repository navigation
Releases: esrrhs/golua
Releases · esrrhs/golua
Release list
v1.0.0
What's New in v1.0.0
🚀 Goroutine Scheduler (fake / sleep / yield)
- New keywords:
faketo spawn a coroutine,sleep <ms>to pause,yield <ticks>to yield execution - New scheduler (
processor.go+routine.go): round-robin time-sliced coroutine dispatch FakeConfig.PerFrameCmdNumcontrols the instruction quota per scheduler tick
📦 Built-in Function Library (parity with Java edition)
| Function | Description |
|---|---|
array() |
Create a new array |
map() |
Create a new map |
gmap() |
Get/create the global map |
size(c) |
Length of array, map, or string |
range(c, pos) |
Iterate array by index |
tonumber(v) |
Convert to number |
tolong(v) |
Convert to integer (truncates float) |
tostring(v) |
Convert to string |
typeof(v) |
Returns type name: "number", "string", "array", "map", "nil", … |
isfunc(name) |
Check if a function exists |
format(fmt, ...) |
Printf-style string formatting |
dofile(path) |
Load and compile a script file at runtime |
dostring(src) |
Load and compile a script string at runtime |
dumpfunc(name) |
Dump bytecode of a named function |
dumpallfunc() |
Dump bytecode of all loaded functions |
getcurfile() |
Current source file |
getcurline() |
Current source line |
getcurfunc() |
Current function name |
getcurcallstack() |
Current call stack as string |
🔌 API Addition
ParseString(src string) error— compile and load a script from an in-memory string
🐛 Bug Fixes
- Fixed panic when calling a void native/bound function as a statement (
record_val(x)style)
✅ Other
- Full test coverage for all new built-ins and
ParseString - All tests pass with
-raceflag