Add troubleshooting guide. Related to #238

opam-2.0.0
Vova 3 years ago
parent 6bd90d9b56
commit 8f4879a8ad

@ -98,8 +98,9 @@ Wasm3 started as a research project and remains so by many means. Evaluating the
## Further Resources
[Demos](./docs/Demos.md)
[Cookbook](./docs/Cookbook.md)
[Installation instructions](./docs/Installation.md)
[Cookbook](./docs/Cookbook.md)
[Troubleshooting](./docs/Troubleshooting.md)
[Build and Development instructions](./docs/Development.md)
[Supported Hardware](./docs/Hardware.md)
[Testing & Fuzzing](./docs/Testing.md)

@ -0,0 +1,27 @@
# Wasm3 troubleshooting
### `Error: [trap] stack overflow`
Increase the stack size:
```sh
wasm3 --stack-size 1000000 file.wasm
```
### `Error: missing imported function`
This means that the runtime doesn't provide a specific function, needed for your module execution.
You need to implement the required functions, and re-build Wasm3.
Alternatively, you can use Python to define your environment. Check out `pywasm3` module.
**Note:** If this happens with `WASI` functions like `wasi_unstable.*` or `wasi_snapshot_preview1.*`, please report as a bug.
### `Error: compiling function overran its stack height limit`
Try increasing `d_m3MaxFunctionStackHeight` in `m3_config.h` and rebuilding Wasm3.
### `Error: [Fatal] repl_load: unallocated linear memory`
Your module requires some `Memory`, but doesn't define/export it by itself.
This happens if module is built by `Emscripten`, or it's a library that is intended to be linked to some other modules.
Wasm3 currently doesn't support running such modules directly, but you can remove this limitation wen you embed Wasm3 into your own app.

@ -8,7 +8,6 @@
#include "Arduino.h"
#include "m3/wasm3.h"
#include "m3/m3_config.h"
#include "m3/extra/fib32.wasm.h"

@ -8,7 +8,6 @@
#include <stdio.h>
#include <time.h>
#include "m3/wasm3.h"
#include "m3/m3_config.h"
#include "m3/extra/fib32.wasm.h"

Loading…
Cancel
Save