Update c-api examples to Context API

This commit is contained in:
Manos Pitsidianakis
2022-07-02 01:48:51 +03:00
parent 62f07efb08
commit eed0327101
27 changed files with 132 additions and 56 deletions

View File

@ -20,6 +20,8 @@ int main(int argc, const char* argv[]) {
printf("Creating the store...\n");
wasm_engine_t* engine = wasm_engine_new();
wasm_store_t* store = wasm_store_new(engine);
wasm_context_t* ctx = wasm_context_new(store, 0);
wasm_store_context_set(store, ctx);
printf("Compiling module...\n");
wasm_module_t* module = wasm_module_new(store, &wasm_bytes);