Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gautric/helloworld-wasm
Hello World App - Cross Compilation Native + WASM
https://github.com/gautric/helloworld-wasm
Last synced: 10 days ago
JSON representation
Hello World App - Cross Compilation Native + WASM
- Host: GitHub
- URL: https://github.com/gautric/helloworld-wasm
- Owner: gautric
- Created: 2022-03-11T10:30:48.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-03-16T15:28:22.000Z (over 2 years ago)
- Last Synced: 2024-10-20T08:58:40.041Z (18 days ago)
- Language: C
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
# Hello World Cross Compilation Native + WASM
## Automake Configuration
autoreconf --install
## Standard C Compilation
./configure
make## WASI Env
pip install wasienv --upgrade
wasienv install-sdk unstable## WASI Compilation
wasiconfigure ./configure
wasimake make## Execution
### Native
HELLOWORLD_ENV=myVal src/helloworld Marie
### WASM
wasmtime run --env HELLOWORLD_ENV=myVal src/helloworld.wasm Marie
....
Call 'helloworld' Marie
HELLOWORLD_ENV = myVal
ret = 42 (helloworld 1.0,)
....## Links
* https://www.gnu.org/software/automake/manual/html_node/Creating-amhello.html
* https://medium.com/wasmer/wasienv-wasi-development-workflow-for-humans-1811d9a50345