Add cmake compatibility to c-api (#4369)
* Add cmake compatibility to c-api * Add CMake documentation to wasmtime.h * Add CMake instructions in examples * Modify CI for CMake support * Use correct rust in CI * Trigger build * Refactor run-examples * Reintroduce example_to_run in run-examples * Replace run-examples crate with cmake * Fix markdown formatting in examples readme * Fix cmake test quotes * Build rust wasm before cmake tests * Pass CTEST_OUTPUT_ON_FAILURE * Another cmake test * Handle os differences in cmake test * Fix bugs in memory and multimemory examples
This commit is contained in:
@@ -8,7 +8,10 @@ Each example is available in both C and in Rust. Examples are accompanied with a
|
||||
`*.wat` file which is the wasm input, or a Rust project in a `wasm` folder which
|
||||
is the source code for the original wasm file.
|
||||
|
||||
Rust examples can be executed with `cargo run --example $name`, and C examples
|
||||
need to be compiled using your system compiler and appropriate header files.
|
||||
Rust examples can be executed with `cargo run --example $name`. C examples can
|
||||
be built with `mkdir build && cd build && cmake ..`. You can run
|
||||
`cmake --build .` to build all examples or
|
||||
`cmake --build . --target wasmtime-$name`, replacing the name as you wish. They
|
||||
can also be [built manually](https://docs.wasmtime.dev/c-api/).
|
||||
|
||||
For more information see the examples themselves!
|
||||
|
||||
Reference in New Issue
Block a user