Misc FunctionsWasmOn this pageWasm Description: A record that provides WASM related functions. executeMainFileAsync Type: Function. Description: Executes the main WASM file (e.g. init.wasm) asynchronously. Signature: executeMainFileAsync: function(self: Wasm, filename: string): boolean Parameters: ParameterTypeDescriptionfilenamestringThe name of the main WASM file. Returns: Return TypeDescriptionbooleanWhether the main WASM file was executed successfully. buildWaAsync Type: Function. Description: Builds the WASM file (e.g. init.wasm) from a Wa-lang project asynchronously. Signature: buildWaAsync: function(self: Wasm, fullPath: string): string Usage: thread(function() local result = Wasm:buildWaAsync("/path/to/wa-lang/project/") if result == "" then print("Built successfully!") else print("Failed to build, due to " .. result) endend) Parameters: ParameterTypeDescriptionfullPathstringThe full path of the Wa-lang project. Returns: Return TypeDescriptionstringThe WASM file building result. formatWaAsync Type: Function. Description: Formats a Wa-lang code file asynchronously. Signature: formatWaAsync: function(self: Wasm, fullPath: string): string Usage: thread(function() local result = Wasm:formatWaAsync("/path/to/wa-lang/code/file.wa") if success == "" then print("Failed to format") else print("Formated code:" .. result) endend) Parameters: ParameterTypeDescriptionfullPathstringThe full path of the Wa-lang code file. Returns: Return TypeDescriptionstringThe Wa-lang code file formatting result. clear Type: Function. Description: Clears the running WASM module and stops the runtime. Signature: clear: function(self: Wasm)