- Where possible, do not directly invoke cargo, but use the supplied Makefile
- wasmer has several compiler backends and the Makefile autodetects whether to enable llvm and singlepass.
Set
ENABLE_{CRANELIFT,LLVM,SINGLEPASS}=1
to build the full set or fail trying - Set
WASMER_CAPI_USE_SYSTEM_LIBFFI=1
to force dynamic linking of libffi on the shared library make install
respectsDESTDIR
, butprefix
must be configured as e.g.WASMER_INSTALL_PREFIX=/usr make all
- wasmer has several compiler backends and the Makefile autodetects whether to enable llvm and singlepass.
Set
- In case you must build/install directly with cargo, make sure to enable at least one compiler backend feature
- Beware that compiling with
cargo build --workspace/--all --features ...
will not enable features on the subcrates in the workspace and result in a headless wasmer binary that can not run wasm files directly.
- Beware that compiling with
- If you split the package into several subpackages, beware that the create-exe command of wasmer requires
libwasmer.a
to be installed at$WASMER_INSTALL_PREFIX/lib/libwasmer.a
. Suggestion for splitting:wasmer
andwasmer-headless
, containing the respective executableswasmer-headless
contains a subset ofwasmer
's functionality and should only be packaged when splitting - it must be built explicitly withmake build-wasmer-headless-minimal install-wasmer-headless-minimal
libwasmer
, containinglibwasmer.so*
libwasmer-dev
, containing the header files and a.pc
filelibwasmer-static
, containinglibwasmer.a
The wasmer distro packaging story is still in its infancy, so feedback is very welcome.