Congcong Cai

Results 84 comments of Congcong Cai

> Also, the current test should already work: see [here](https://www.assemblyscript.org/editor#IyFvcHRpbWl6ZT1zcGVlZCZydW50aW1lPXN0dWIKZnVuY3Rpb24gZm9vKCk6ICh2OiBpMzIpID0+IHZvaWQgewogIGxldCBmbiA9ICh2OiBpMzIpOiB2b2lkID0+IHsKICAgIGFzc2VydCh2ID09IDEyMzQpOwogIH07CgogIGFzc2VydChmbi5pbmRleCAhPSAwKTsKICBmbigxMjM0KTsKICByZXR1cm4gZm47Cn0KCmxldCBmbiA9IGZvbygpOwoKZXhwb3J0IGZ1bmN0aW9uIHJ1bigpOiB2b2lkIHsKICAvLyBDbGljayBtb2R1bGUud2F0LCB0aGVuIFJ1bi4KICAvLyBUaGVuLCBjbGljayBtb2R1bGUudHMgKHRoaXMgdGFiKSwgY2hhbmdlIDEyMzUgdG8gMTIzNC4KICAvLyBDbGljayBtb2R1bGUud2F0IGFnYWluLCBhbmQgdGhlbiBSdW4gYWdhaW4uCiAgLy8gVGhpcyAiZXhwb3J0IGZ1bmN0aW9uIHJ1bigpOiB2b2lkIiBpc24ndCBuZWNlc3NhcnkgZm9yIHRoaXMgdG8gd29yay4KICBmbigxMjM1KTsKfQojIWh0bWwKPHNjcmlwdCB0eXBlPSJtb2R1bGUiPgogIGNvbnN0IHtydW59ID0gYXdhaXQgaW5zdGFudGlhdGUoYXdhaXQgY29tcGlsZSgpKQogIGxldCBzdGF0dXMgPSAid29ya2luZyIKCiAgdHJ5IHsKICAgIHJ1bigpCiAgfSBjYXRjaCAoZSkgewogICAgc3RhdHVzID0gIm5vdCB3b3JraW5nXG4iICsgZQogIH0KCiAgZG9jdW1lbnQuYm9keS5pbm5lclRleHQgPSBzdGF0dXMKPC9zY3JpcHQ+). Yes. This pr will not support closure. It only wants to support store function instance in heap instead of in...

This is binaryen bug which fixed in latest binaryen. ``` # compiler/first-class-function - compile debug SUCCESS (251.300 ms) - compare fixture SUCCESS (1.495 ms) - compile release SUCCESS (397.126 ms)...

> @HerrCai0907 I changed the commit message; this is technically a breaking change. You can modify it when click squash and merge😆 . Actually the message in commit is meaningless.

I want to reopen this feature request since WASM loading time is still slow. A builtin watch mode can alleviate the problem effectively.

You can use nodejs to run wasm binary from moonbit. 你可以用nodejs直接运行moonbit的编译后的wasm ``` // node v22.3.0 // run.mjs ( await WebAssembly.instantiate( ( await import("node:fs") ).readFileSync("target/wasm-gc/release/build/main/main.wasm"), { spectest: { print_char: (ch) =>...

What is this type in wasm level? type is not only for diagnose, It should be mapped to lower level memory layout. Maybe you can describe the high level requirement....

You should use u64 to store host pointer if you want to consider compatibility for 64bit host machine and 32bit host machine. Otherwise it is not a reusable wasm module...

I recommend to use `externref` for this case.

In high performance embedded device which has larger RAM than the traditional embedded device but not too much (>1M). In this case, 64kB per page is still to much granularity....

> Does this do anything that `--maximumMemory` doesn't? maximumMemory is in 64kB size, but lowMemoryLimit is 16B size. But I agree we may can unify them.