wasm在Linux下的安裝記錄

(Owed by: 春夜喜雨 http://blog.csdn.net/chunyexiyu)

參考文檔: 官方安裝說明https://emscripten.org/docs/getting_started/downloads.html

wasm-webassemble,算是網頁上的彙編程序,運行效率很高,應該是要比js的效率高上一個數量級。在一定的包裝和限制條件下,可以把C/C++語言的程序編譯到網頁端來運行。
當前主流的瀏覽器都對wasm進行了支持,詳細地可以baidu/google查一查。
下面是在Linux-CentroOS的一個安裝過程記錄。

Linux下安裝

1. 安裝前準備

安裝前需要完成python2.7與cmake的安裝

# Install Python
yum install python2.7
# Install CMake (optional, only needed for tests and building Binaryen)
yum install cmake
# Install Java (optional, only needed for Closure Compiler minification)
yum install default-jre

2. 下載emsdk

git clone https://github.com/juj/emsdk.git

3. 安裝

cd emsdk
# 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

(Owed by: 春夜喜雨 http://blog.csdn.net/chunyexiyu)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章