Rerumu / Wasynth

WebAssembly to Lua translation library and tool
https://discord.gg/JuekZtYmxx
GNU General Public License v3.0
140 stars 19 forks source link

Export runtime for luau. #33

Closed basicer closed 10 months ago

basicer commented 10 months ago

Methods like rt.load.string on the runtime are super useful for implementing imported functions like the ones needed for WASI. Exporting these functions from the generated code allows those functions to continue to work even as the memory representation changes (i.e. as it has from tables to buffers).

Rerumu commented 10 months ago

For a while I've been meaning to do this with some form of conditional compilation that made sense. Ideally rt is exposed in the CLI but not the Rust API functions. This solution is good though as that sort of conditional magic isn't possible with my code at the moment.

Thank you!