WebAssembly Integration#
MoonBit is a programming language that provides first-class support for WebAssembly.
Component Model#
Check out this tutorial on how to work with component model in MoonBit.
Custom Export and Import#
Check out FFI section on how to import or export functions.
Q&A#
Q: What is
spectest.print_char
A: It’s how MoonBit prints. It prints a UTF-16 unicode code at a time. For portability, avoid using
println
. If this does occur in the final result, consider usingwasm-merge
or similar tools.