Skip to content

Commit

Permalink
Fix WASI example that initialized wasi_config 2 times
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb authored and Michael-F-Bryan committed Feb 21, 2023
1 parent abd03ec commit 0a2137f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/c-api/examples/wasi.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ int main(int argc, const char* argv[]) {

wasm_byte_vec_delete(&binary);

printf("Setting up WASI...\n");
config = wasi_config_new("example_program");
// TODO: error checking
js_string = "function greet(name) { return JSON.stringify('Hello, ' + name); }; print(greet('World'));";
wasi_config_arg(config, "--eval");
wasi_config_arg(config, js_string);
wasi_config_capture_stdout(config);

wasi_env_t* wasi_env = wasi_env_new(store, config);

if (!wasi_env) {
Expand Down

0 comments on commit 0a2137f

Please sign in to comment.