when
fn init {
println("whats_up")
}
i get wat
(func $printc (import "spectest" "print_char") (param $i i32))
(func $moonbit.output_string (param $str (ref $moonbit.string))
(local $counter i32)
(loop $loop
(if (i32.lt_s (local.get $counter) (array.len (local.get $str)) )
(then
(call $printc
(array.get_u $moonbit.string (local.get $str) (local.get $counter)))
(local.set $counter (i32.add (local.get $counter) (i32.const 1)))
(br $loop)
)
(else))))
I don’t think “spectest” “print_char” is standard or common
This took me a lot of time
Are there any other similar APIs for external interaction that have this kind of situation?