enarx / codex

Code examples that can be compiled to WebAssembly for use with Enarx
Apache License 2.0
22 stars 14 forks source link

feat(zig/fib): read index from argv #18

Closed rvolosatovs closed 2 years ago

rvolosatovs commented 2 years ago

This will work correctly on Enarx once https://github.com/enarx/enarx/issues/2090 is addressed.

$ wasmtime ./result/main.wasm 7 21 
Fibonacci sequence number at index 7 is 13
Fibonacci sequence number at index 21 is 10946
$ enarx run --wasmcfgfile ./result/Enarx.toml ./result/main.wasm
Fibonacci sequence number at index 21 is 10946
Error: Exited with i32 exit status 0
wasm backtrace:
    0: 0x34e9 - <unknown>!<wasm function 15>