Clang
This package enables running clang natively using only WebAssembly and Wasmer.
Let's start creating a example.c file, so we can compile it to WebAssembly:
#include <stdio.h>
int main() {
printf("Hello, World!
");
return 0;
}
wasmer run clang/clang --dir=. -- example.c -o example.wasm
And last, but not least... run it with Wasmer!
wasmer run example.wasm