This page tracks which parts of the Lua 5.2 standard library MoonSharp implements, on which platforms, and which functions can yield.

NOTE : this reflects the state of the standard library as captured in the original status document. It has not been re-verified against the 3.0.0 beta - see the changelog for recent changes.

Legend
New in Moon#Function has been introduced in Moon# and is not present in Lua 5.2
DoneImplemented completely
Done, with differencesImplemented, but has differences from the Lua version (detailed in comments)
Not done, issuesNot completed yet
Unsupported, stubUnsupported, but implemented as a stub for compatibility
UnsupportedUnsupported and likely support will be limited or non-existent also in the future
Not done yetNot even started

The Yield column says whether the function can yield a coroutine: YES it can, NO it cannot, not applicable.

API Status Yield CLR Mono Unity Differences Yielding notes
_GDone
_VERSIONDone
_MOONSHARPNew in Moon#A table, containing several fields including moonsharp version, platform and emulated lua version.
assertDone
collectgarbageDoneSome arguments ignored
dofileDoneYES
errorDone
getmetatableDone
ipairsDoneYES
loadDoneNOA function as input cannot yield.
loadsafeNew in Moon#NOSame as loadfile, but with better handling of default _ENV for sandboxing.
loadfileDone, with differencesstdin as input is not supported.
loadfilesafeNew in Moon#Same as loadfile, but with better handling of default _ENV for sandboxing.
nextDone
pairsDoneYES
pcallDoneYES
printDoneNO__tostring cannot yield when called from print
rawequalDone
rawgetDone
rawlenDone
rawsetDone
requireDoneYESMinor internal differences
selectDone
setmetatableDone
tonumberDone, with differencesOnly bases between 2 and 10, and base 16 are supported.
tostringDoneYES
typeDone
xpcallDone, with differencesNODouble faults are appended to error and ignored.Code can yield, but the error message handler cannot.
bit32.arshiftDone
bit32.bandDone
bit32.bnotDone
bit32.borDone
bit32.btestDone
bit32.bxorDone
bit32.extractDone
bit32.lrotateDone
bit32.lshiftDone
bit32.replaceDone
bit32.rrotateDone
bit32.rshiftDone
coroutine.createDone
coroutine.resumeDone
coroutine.runningDone
coroutine.statusDone
coroutine.wrapDone
coroutine.yieldDone
debug.debugDone
debug.getuservalueDone
debug.gethookUnsupportedUse the debugger infrastructure.
debug.getinfoUnsupportedFunction is heavily dependent on implementation details.
debug.getlocalUnsupportedFunction is heavily dependent on implementation details.
debug.getmetatableDone
debug.getregistryDone
debug.getupvalueDone
debug.setuservalueDone
debug.sethookUnsupportedUse the debugger infrastructure.
debug.setlocalUnsupportedFunction is heavily dependent on implementation details.
debug.setmetatableDoneCannot set on userdata as now.
debug.setupvalueDone
debug.tracebackDone
debug.upvalueidDone, with differencesWorks ok, but returns a number instead of userdata (still, can be used in pretty much the same way).
debug.upvaluejoinNot done yet
dynamic.evalNew in Moon#Evaluates the code passed as a parameter dynamically. All accesses are raw, function calls will raise an error.
dynamic.prepareNew in Moon#Prepares an expression for faster evaluation with dynamic.eval.
file:closeDone
file:flushDone
file:linesDone
file:readDone
file:seekDone
file:setvbufDone
file:writeDone
io.closeDone
io.flushDone
io.inputDone
io.linesDone
io.openDone
io.outputDone
io.popenUnsupportedInterprocess comms, stdin and stdout are NOT supported. This however is ok by the Lua standard.
io.readDone
io.stderrDone
io.stdinDone
io.stdoutDone
io.tmpfileDone
io.typeDone
io.writeDone
math.absDone
math.acosDone
math.asinDone
math.atanDone
math.atan2Done
math.ceilDone
math.cosDone
math.coshDone
math.degDone
math.expDone
math.floorDone
math.fmodDone
math.frexpDone
math.hugeDone
math.ldexpDone
math.logDone
math.maxDone
math.minDone
math.modfDone
math.piDone
math.powDone
math.radDone
math.randomDoneMinor differences in accepted inputs (MoonSharp is more tolerant)
math.randomseedDone
math.sinDone
math.sinhDone
math.sqrtDone
math.tanDone
math.tanhDone
os.clockDone
os.dateDoneRunning on Mono systems might lead to erroneous output due to a Mono bug (11817)
os.difftimeDone
os.executeDone
os.exitDone
os.getenvDone
os.removeDone
os.renameDone
os.setlocaleUnsupported, stubUnsupported, currently a stub
os.timeDone
os.tmpnameDone
package.configDone
package.cpathUnsupportedSee Script loaders to see how to customize loading of scripts and packages
package.loadedDone
package.loadlibUnsupportedSee Script loaders to see how to customize loading of scripts and packages
package.pathUnsupportedSee Script loaders to see how to customize loading of scripts and packages
package.preloadUnsupportedSee Script loaders to see how to customize loading of scripts and packages
package.searchersUnsupportedSee Script loaders to see how to customize loading of scripts and packages
package.searchpathUnsupportedSee Script loaders to see how to customize loading of scripts and packages
string.byteDoneCharacter codes are cropped to 0-255. Use string.unicode to have the unicode code-point.
string.charDoneValues > 255 are silently supported (as unicode codepoints)
string.dumpDoneFunctions with upvalues raise an error as Lua 5.0 did and as Lua 5.2 should do according to documentation.
string.findDoneImplementation taken from KopiLua. Patterns cannot contain \0. Use %z instead.
string.formatDoneNOImplementation taken from KopiLua.__tostring metamethod cannot yield.
string.gmatchDoneImplementation taken from KopiLua. Patterns cannot contain \0. Use %z instead.
string.gsubDoneNOImplementation taken from KopiLua. Patterns cannot contain \0. Use %z instead.Callback function (if used) cannot yield.
string.lenDone
string.lowerDone
string.matchDoneImplementation taken from KopiLua. Patterns cannot contain \0. Use %z instead.
string.repDone
string.reverseDone
string.subDone
string.unicodeNew in Moon#Works just as string.byte would do, but returns the unicode code-point without truncation.
string.upperDone
table.concatDoneNO__len cannot yield
table.insertDoneNO__len cannot yield
table.packDone
table.removeDoneNO__len cannot yield
table.sortDoneNO__lt, __len and the comparison function cannot yield
table.unpackDone

The original spreadsheet is still available as a PDF download.