Skip to content

Custom Polyfills

Advanced users might want to replace the default standard library polyfills (for bit32, string, etc.) with their own implementations.

You can specify a custom polyfill source in kaledis.toml.

[polyfill]
location = "https://github.com/my-user/my-polyfill"
[polyfill]
location = "./my-local-polyfill"

A custom polyfill folder usually contains a custom_polyfill.toml (or similar, depending on implementation) and the lua files that implement the required functions. you can look for an example at: https://github.com/CavefulGames/dalbit-polyfill

  • Missing functions: If your game crashes with errors like attempt to call field 'band' (a nil value), your custom polyfill might be incomplete. Ensure you implement all Luau standard library functions used by your code/dependencies.
  • Version mismatch: If updating Kaledis, check if the expected polyfill interface has changed.