WebAssembly,又称为Wasm,是以WEB的方式在浏览器里支持编译用c++和其它语言编写的代码,在aardio中怎么让它支持webassembly呢?
有一个思路是我们可以通过内嵌chrome内核控件(如web.view)的方法来间接使用它.
目前支持WebAssembly的chrome版本是chrome70,
但本人尝试在chrome64版本里查看了一下,
发现chrome64版本也可以开启WebAssembly相关功能,
现将chrome64版本中开启WebAssembly的方法分享一下.
第1步,在chrome浏览器地址栏中输入"chrome://flags/"回车打开实验功能设置页,
第2步,在页面的搜索框里输入"web"查找相关的实验项,
第3步,可以找到如下项:
WebAssembly streaming compile/instantiate support.
WebAssembly.{compile|instantiate} taking a Response as parameter. – Mac, Windows, Linux, Chrome OS, Android
#enable-webassembly-streaming
这段英文的意思是开启wasm流式编译和实例化支持功能.
第4步,把它设置为"Enable",让它成为开启状态.