feat!: add workaround for wasi-libc reactor/command model (#13)

* feat: add workaround for wasi-libc reactor/command model
This commit is contained in:
Mike Voronov 2023-02-24 00:57:22 +03:00 committed by GitHub
parent c7ea490286
commit c1fa069dcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,10 @@ void write_le_int(unsigned char *array, unsigned int offset, unsigned int value)
array[offset + 3] = (value >> 24) & 0xff; array[offset + 3] = (value >> 24) & 0xff;
} }
extern void __wasm_call_ctors();
int main() { int main() {
// the main purpose of this empty main is to initialize WASI subsystem __wasm_call_ctors(); // for more details see https://github.com/WebAssembly/WASI/issues/471
return 0; return 0;
} }