[user@openwork fortran]$ cat test.html <!DOCTYPE html> <html> <body> <script type="module"> async function init() { const { instance } = await WebAssembly.instantiateStreaming( fetch("./test.wasm") ); var result = instance.exports.pi_leibniz(100000000); document.write(result) } init(); </script> </body> </html> [user@openwork fortran]$ make flang-new -O2 --target=i386 -emit-llvm -S test.f90 llc --march=wasm32 -filetype=obj test.ll wasm-ld -L/usr/local/lib/clang/17/lib/wasi/ -l:libclang_rt.builtins-wasm32.a --no-entry --export-all -o test.wasm test.o
https://misskey-taube.s3.wasabisys.com/files/997a8e3c-3fa8-4631-87bb-8de4f427ecf9.png