LingDong- / wax

A tiny programming language that transpiles to C, C++, Java, TypeScript, Python, C#, Swift, Lua and WebAssembly 🚀
https://waxc.netlify.app/
MIT License
783 stars 45 forks source link

Can WAX be used with WASI (namely wasi_snapshot_preview1)? #31

Open CRTandKDU opened 3 months ago

CRTandKDU commented 3 months ago

While trying to run the WASM produced from the helloworld.wax example with WASMER (wasmer helloworld.wasm) we get the expected error:

error: Unable to instantiate the WebAssembly module ╰─▶ 1: Error while importing "console"."log": unknown import. Expected Function(FunctionType { params: [I32, I32], results: [] })

Is it possible to have WAX use fd_write from WASI instead of console.log? Please advise on what needs to be changed. Thanks in advance, JMC