Rerumu / Wasynth

WebAssembly to Lua translation library and tool
https://discord.gg/sgm5YcmgyD
GNU General Public License v3.0
130 stars 18 forks source link

Export runtime for luau. #33

Closed basicer closed 8 months ago

basicer commented 8 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 8 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!