Skip to content

Instantly share code, notes, and snippets.

@ukyo
Last active March 20, 2016 19:08
Show Gist options
  • Save ukyo/adf1954916e39ae19014 to your computer and use it in GitHub Desktop.
Save ukyo/adf1954916e39ae19014 to your computer and use it in GitHub Desktop.
emscriptenでwabassembly試す

ビルドメモ

インスコ

~/.emscriptenBINARYEN_ROOT = 'path/to/binaryen'を追記。

ビルド

emcc -O3 input.cpp -o foo.html -s BINARYEN=1
path/to/sexpr-wasm-prototype/out/sexpr-wasm foo.wast -o foo.wasm
cp foo.wast.mappedGlobals foo.wasm.mappedGlobals

python -m SimpleHTTPServerとかでみる

#include <iostream>
int main() {
std::cout << "hello\n";
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment