web开发入门到深入-WebAssembly(1)
WebAssembly
WebAssembly是一種新型的可以在現代web瀏覽器中運行的代碼——這是一種低級assembly-like語言與一個緊湊的二進制格式,近乎本機的性能,并提供語言如C / c++, c#和rust的編譯目標,這樣他們就可以在web上運行。它還被設計為與JavaScript一起運行,允許兩者一起工作。
WebAssembly目標
WebAssembly是W3C WebAssembly Community Group內部的一個開放標準,其目標如下:
快速、高效和可移植——WebAssembly代碼可以在不同的平臺上以接近本機的速度執行,這是通過利用通用的硬件功能實現的。
可讀性和可調試性——WebAssembly是一種低級匯編語言,但它確實有一種人類可讀的文本格式(該規范仍在最終確定中),允許手工編寫、查看和調試代碼。
保持安全——WebAssembly被指定在一個安全的沙箱執行環境中運行。像其他web代碼一樣,它將強制執行瀏覽器的同源和權限策略。
不要破壞web - WebAssembly被設計成可以很好地與其他web技術兼容并保持向后兼容性。
Get the emsdk repo
git clone https://github.com/emscripten-core/emsdk.git
Enter that directory
cd emsdk
Note
You can also get the emsdk without git, by selecting “Clone or download => Download ZIP” on the emsdk GitHub page.
Run the following emsdk commands to get the latest tools from GitHub and set them as active:
Fetch the latest version of the emsdk (not needed the first time you clone)
git pull
Download and install the latest SDK tools.
./emsdk install latest
Make the “latest” SDK “active” for the current user. (writes .emscripten file)
./emsdk activate latest
Activate PATH and other environment variables in the current terminal
source ./emsdk_env.sh
Note
On Windows, run emsdk instead of ./emsdk, and emsdk_env.bat instead of source ./emsdk_env.sh.
Note
git pull will fetch the current list of tags, but very recent ones may not yet be present there. You can run ./emsdk update-tags to update the list of tags directly.
If you change the location of the SDK (e.g. take it to another computer on an USB), re-run the ./emsdk activate latest and source ./emsdk_env.sh commands.
Emsdk install targets
In the description above we asked the emsdk to install and activate latest, which is the latest tagged release. That is often what you want.
You can also install a specific version by specifying it, for example,
./emsdk install 1.38.45
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的web开发入门到深入-WebAssembly(1)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Springboot Mybatis使用
- 下一篇: 学习Spring Boot:(二十三)S