Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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