How can I compile the following code with --target wasm32-wasi?
#include <math.h>
float compute(double x) {
return sin(x);
}
I tried:
>zig build-exe wasm.c -target wasm32-wasi
error(compilation): clang failed with stderr: wasm.c:1:10: fatal error: 'math.h' file not found
wasm.c:1:1: error: unable to build C object: clang exited with code 1
How to solve that? Doesn't WASI provide those libraries? Can I (and should I) compile them statically?