Skip to content

Commit

Permalink
Document some suggestions for distro packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
jcaesar committed Feb 22, 2021
1 parent a9537c9 commit a0800cb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions PACKAGING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Wasmer distro packaging notes

* 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` respects `DESTDIR`, but `prefix` must be configured as e.g. `WASMER_INSTALL_PREFIX=/usr make all`
* 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.
* 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` and `wasmer-headless`, containing the respective executables
* `wasmer-headless` contains a subset of `wasmer`'s functionality and should only be packaged when splitting - it must be built explicitly with `make build-wasmer-headless-minimal insteall-wasmer-headless-minimal`
* `libwasmer`, containing `libwasmer.so*`
* `libwasmer-dev`, containging the header files and a `.pc` file
* `libwasmer-static`, containing `libwasmer.a`

The wasmer distro packaging story is still in its infancy, so feedback is very welcome.

0 comments on commit a0800cb

Please sign in to comment.