zoukankan      html  css  js  c++  java
  • 初探WebAssembly

    环境安装(windows)

    1. 需要安装git,node,最新的python,并配置环境变量。
    2. 安装emscripten: 在目录下打开git窗口,执行以下命令:
      1).克隆emsdkgit clone https://github.com/juj/emsdk.git
      2).进入emsdk文件夹cd emsdk
      3).更新emsdk./emsdk update
      3).更新emsdkgit pull
      4).安装最新的emsdk 并配置全局的环境变量./emsdk install --global latest
      5).激活./emsdk activate latest
    3. “hello world”:
      1.)将 Emscripten 的环境变量配置到当前的命令行窗口下source ./emsdk_env.sh
      2.)mkdir hellocd hellovim hello.c
      3.) 编写:#include <stdio.h> int main(int argc, char ** argv) { printf("hello, world! "); }
      4.)编译emcc hello.c -s WASM=1 -o hello.html
      5.)启动服务:emrun --no_browser --port 8080
      6.)浏览器打开服务,点击'hello.html',就能看到“hello,world!”
  • 相关阅读:
    【Linux】——sleep无法正常休眠
    【网络——Linux】——IPMI详细介绍【转】
    【Linux】——ctags
    10086 8元套餐
    建置 区域划分
    几何
    孙武
    监察委
    python 内置函数
    Oracle cursor and table
  • 原文地址:https://www.cnblogs.com/wangrui38/p/13153628.html
Copyright © 2011-2022 走看看