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 will be automatically available inside the Wasmer installed path.
The C (wasmer.h
) and C++ (wasmer.hh
) header
files can be found in the Wasmer include
directory:
The runtime shared libraries (.so
, .dylib
, .dll
) can be found in the Wasmer
lib
directory:
Note: You can also download the libraries or header files directly from Wasmer release page.
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
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.
The tests can be run via cargo test
, such as:
To run tests manually, enter the lib/c-api/tests
directory
and run the following commands:
pkg-config
The Wasmer binary ships with an utility tool that outputs config
in the pkg-config
format.
You can use it like:
License
Wasmer is primarily distributed under the terms of the MIT license (LICENSE).