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)

你可能感兴趣的:(wasm)