MCPcopy Create free account
hub / github.com/WebAssembly/wasm-c-api / run

Function run

example/finalize.cc:64–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62
63
64void run() {
65 // Initialize.
66 std::cout << "Initializing..." << std::endl;
67 auto engine = wasm::Engine::make();
68
69 std::cout << "Live count " << live_count << std::endl;
70 std::cout << "Creating store 1..." << std::endl;
71 auto store1 = wasm::Store::make(engine.get());
72
73 std::cout << "Running in store 1..." << std::endl;
74 run_in_store(store1.get());
75 std::cout << "Live count " << live_count << std::endl;
76
77 {
78 std::cout << "Creating store 2..." << std::endl;
79 auto store2 = wasm::Store::make(engine.get());
80
81 std::cout << "Running in store 2..." << std::endl;
82 run_in_store(store2.get());
83 std::cout << "Live count " << live_count << std::endl;
84
85 std::cout << "Deleting store 2..." << std::endl;
86 std::cout << "Live count " << live_count << std::endl;
87 }
88
89 std::cout << "Running in store 1..." << std::endl;
90 run_in_store(store1.get());
91 std::cout << "Live count " << live_count << std::endl;
92
93 std::cout << "Deleting store 1..." << std::endl;
94}
95
96
97int main(int argc, const char* argv[]) {

Callers 1

mainFunction · 0.70

Calls 2

run_in_storeFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected