zoukankan      html  css  js  c++  java
  • emcc,wasm,webassembly

    WASM:

    https://github.com/Hanks10100/wasm-examples/tree/master/simple

    mkdir hello
    cd hello
    echo '#include <stdio.h>' > hello.c
    echo 'int main(int argc, char ** argv) {' >> hello.c
    echo 'printf("Hello, world! ");' >> hello.c
    echo '}' >> hello.c
    emcc hello.c -s WASM=1 -o hello.html


    printf '#include<iostream> int main() { std::cout<<"hello world"<<std::endl; return 0;}' > helloworld.cpp

    docker run --rm -v $(pwd):/src trzeci/emscripten emcc helloworld.cpp -o helloworld.html

    docker run --rm -v $(pwd):/src trzeci/emscripten emcc math.c -Os -s WASM=1 -s SIDE_MODULE=1 -o math.wasm


    python3 -m http.server 8080 #此时打开localhost:8080即可看到相应页面

    emcc math.c -Os -s WASM=1 -s SIDE_MODULE=1 -o math.wasm

    https://github.com/Hanks10100/wasm-examples
    https://blog.csdn.net/liuyan19891230/article/details/79144332
    https://segmentfault.com/a/1190000008402872

  • 相关阅读:
    LAMP 环境搭建
    环境搭建/安装部署
    Linux 系统安装(5分钟)
    Eclipse 配置
    wsdl生成的客户端
    Oracle 修改字符集
    jquery expand
    js中不常用的对象或方法
    js中面向对象的封装
    JavaScript点击li显示索引
  • 原文地址:https://www.cnblogs.com/SZLLQ2000/p/10406140.html
Copyright © 2011-2022 走看看