Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
wasmer-c-api

This crate exposes a C and a C++ API for the Wasmer runtime. It also fully supports the wasm-c-api common API.
Usage
Once you install Wasmer in your system, the shared object files and the headers are available inside the Wasmer installed path.
$WASMER_DIR/
lib/
libwasmer.{so,dylib,dll}
include/
wasm.h
wasmer.h
wasmer.hh
wasmer_wasm.h
Wasmer binary also ships with wasmer-config
an utility tool that outputs config information needed to compile programs which use Wasmer.
The full C API documentation can be found here: https://wasmerio.github.io/wasmer/c-api/
Here is a simple example to use the C API:
int
Building
You can compile Wasmer shared library from source:
make build-capi
This will generate the shared library (depending on your system):
- Windows:
target/release/libwasmer_c_api.dll
- macOS:
target/release/libwasmer_runtime_c_api.dylib
- Linux:
target/release/libwasmer_runtime_c_api.so
If you want to generate the library and headers in a friendly format as shown in Usage, you can execute the following in Wasmer root:
This command will generate a package
directory, that you can then use easily in the Wasmer C API examples.
Testing
Tests are run using the release build of the library. If you make changes or compile with non-default features, please ensure you rebuild in release mode for the tests to see the changes.
To run all the full suite of tests, enter Wasmer root directory and run the following commands:
wasmer config
wasmer config
output various configuration information needed to compile programs which use Wasmer.
wasmer config --pkg-config
It outputs the necessary details for compiling and linking a program to Wasmer,
using the pkg-config
format:
wasmer config --includedir
Directory containing Wasmer headers:
wasmer config --libdir
Directory containing Wasmer libraries:
wasmer config --libs
Libraries needed to link against Wasmer components:
wasmer config --libs
Libraries needed to link against Wasmer components:
License
Wasmer is primarily distributed under the terms of the MIT license (LICENSE).