Implement wasm_config_new and wasm_engine_new_with_config (#901)

* Implement wasm_config_new and wasm_engine_new_with_config
This commit is contained in:
Yury Delendik
2020-02-05 09:29:46 -06:00
committed by GitHub
parent b3ac718421
commit 961853fd1c
7 changed files with 286 additions and 4 deletions

View File

@@ -0,0 +1,13 @@
// Compile with:
// clang --target=wasm32 fib-wasm.c -o fib-wasm.wasm -g \
// -Wl,--no-entry,--export=fib -nostdlib -fdebug-prefix-map=$PWD=.
int fib(int n) {
int i, t, a = 0, b = 1;
for (i = 0; i < n; i++) {
t = a;
a = b;
b += t;
}
return b;
}