1.安装Clang并set up几个aliases
例如,在Debian上:
sudo apt-get install clang lld gcc-multilib
alias wld=“wasm-ld-8 --no-entry --export-dynamic --allow-undefined”
alias wcc=“clang --target=wasm32 -c -O3”
2.对.c文件进行编译(.c包含了一个功能函数,没有main函数)
Build a wasm binary with
wcc reverse.c
wld reverse.o -o reverse.wasm
——以上为自己总结的较为官方的方法。
Comments 1 条评论
博客作者 Neal Tennison
hello there and thank you for your info – I have definitely picked up something new from right here. I did however expertise some technical points using this website, since I experienced to reload the web site a lot of times previous to I could get it to load properly. I had been wondering if your hosting is OK? Not that I’m complaining, but sluggish loading instances times will often affect your placement in google and could damage your quality score if advertising and marketing with Adwords. Well I’m adding this RSS to my e-mail and can look out for a lot more of your respective fascinating content. Ensure that you update this again very soon..