To build C applications that use the Wasmer runtime as a host for guest Wasm modules, you will need a C compiler installed (clang or gcc, for example). Check the compiler installation instructions here.
Starting with Wasmer 1.0 all the releases ship with the required libraries and headers to use Wasmer from C and C++.
Download Wasmer from Wasmer releases page.
Depending on your system, you will need to download:
Linux: wasmer-linux-amd64.tar.gz or wasmer-linux-aarch64.tar.gz
macOS: wasmer-darwin-amd64.tar.gz or wasmer-darwin-arm64.tar.gz
Windows: wasmer-windows.tar.gz
Once you have downloaded the framework, you can now extract its contents and set the WASMER_DIR environment variable to the path of the wasmer directory (this will be very useful when running the examples):
# Extract the contents to a dir
mkdir wasmer
tar -C wasmer -zxvf wasmer-*.tar.gz
export WASMER_DIR=$(pwd)/wasmer
# Update LD_LIBRARY_PATH to link against the libwasmer.so in the examples
export LD_LIBRARY_PATH=$WASMER_DIR/lib/:$LD_LIBRARY_PATH
gcc --version
sudo apt-get install build-essential
gcc --version
# This should output: "ATTRIBUTIONS LICENSE bin include lib"
ls $WASMER_DIR