Skip to content

Pure lua libraries for emulating luau libraries used for transpiling in dalbit

License

Notifications You must be signed in to change notification settings

CavefulGames/dalbit-polyfill

Repository files navigation

한국어 👈

English

dalbit-polyfill

Polyfill libraries for dalbit used transpiling luau to lua (especially Lua 5.3)

Implementations

Globals

  • typeof
  • unpack
  • newproxy
  • gcinfo
  • More details here

Libraries

  • buffer
  • math
  • os (sandboxed)
  • string
  • table
  • debug
  • bit32
  • utf8

TO-DOs

  • Benchmarks next polyfill functions (between luauNext and djb2Next)

Limitations

  • Please do not depend on error messages. since we can't compare table and number(primitive types), polyfill's custom types such as userdata type will be shown as table when comparing numbers like this example code.
local a = newproxy() < 2 -- errors: "attempt to compare table < number"
-- correct error message: "attempt to compare userdata < number"
  • Please do not depend on hash table's orders. while the polyfill is trying to use/imitate Luau's hash table implementations, it might still have some critical edge cases with orders(especially with number hashing and pointer hashing. the order is not guaranteed as Luau's one)
  • Lua 5.3 has integers so there may be slightly different behavior.
  • There may still be differences from Luau due to differences in Lua version and environment.

Special Thanks

About

Pure lua libraries for emulating luau libraries used for transpiling in dalbit

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages