port tunnel example to C

This commit is contained in:
2022-01-02 15:22:11 +01:00
parent 88ee0e1bef
commit 20365a0dd0
2 changed files with 37 additions and 0 deletions

6
examples/c/build.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
clang -O2 -Wno-incompatible-library-redeclaration --no-standard-libraries -ffast-math -Wl,--no-entry -Wl,--export-all -Wl,--import-memory -Wl,--initial-memory=262144 -Wl,-zstack-size=90000 -o cart.wasm cart.c --target=wasm32 && \
uw8 filter-exports cart.wasm cart.wasm && \
wasm-opt -Oz --fast-math --strip-producers -o cart.wasm cart.wasm && \
uw8 pack -l 9 cart.wasm cart.uw8