Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
c Made a seperate command for compiling plain wasm Nov 6, 2019
cpp Made a seperate command for compiling plain wasm Nov 6, 2019
.gitignore Added tests and improved commands structure Oct 25, 2019
README.md Added tests and improved commands structure Oct 25, 2019

README.md

wasienv examples

Simple C file

You can compile the example.c file into WebAssembly with wasicc:

cd examples/c

wasicc example.c -o example

This will create:

  • example.wasm file with the WebAssembly contents
  • example executable that runs example.wasm with a WebAssembly runtime

Simple C file

You can compile the example.cpp file into WebAssembly with wasicc:

cd examples/cpp

wasic++ example.c -o example

This will create:

  • example.wasm file with the WebAssembly contents
  • example executable that runs example.wasm with a WebAssembly runtime

CMake project

If you are working with CMake, you just need to wrap the cmake call with wasimake. Example:

# Before
cmake .

# After
wasimake cmake .

Note: The project c-wasm-simd128-example showcases very easily how to use it

Autoconf project

If your project is using Autoconf, you just need to wrap the calls to ./configure and make with wasiconfigure and wasimake respectively. Example:

# Before
./configure
make

# After
wasiconfigure ./configure
wasimake make

Note: The project jq showcases very easily how to use it.

You can’t perform that action at this time.