Wasmtime
wasip2.h File Reference
#include <wasm.h>
#include <wasmtime/conf.h>

Go to the source code of this file.

Typedefs

typedef struct wasmtime_wasip2_config_t wasmtime_wasip2_config_t
 Config for the WASIP2 context.
 

Functions

wasmtime_wasip2_config_twasmtime_wasip2_config_new ()
 Create a wasmtime_wasip2_config_t.
 
void wasmtime_wasip2_config_inherit_stdin (wasmtime_wasip2_config_t *config)
 Configures this context's stdin stream to read the host process's stdin. More...
 
void wasmtime_wasip2_config_inherit_stdout (wasmtime_wasip2_config_t *config)
 Configures this context's stdout stream to write to the host process's stdout.
 
void wasmtime_wasip2_config_inherit_stderr (wasmtime_wasip2_config_t *config)
 Configures this context's stderr stream to write to the host process's stderr.
 
void wasmtime_wasip2_config_arg (wasmtime_wasip2_config_t *config, const char *arg, size_t arg_len)
 Appends a single argument to get passed to wasm.
 
void wasmtime_wasip2_config_delete (wasmtime_wasip2_config_t *config)
 Delete a wasmtime_wasip2_config_t. More...
 

Function Documentation

◆ wasmtime_wasip2_config_delete()

void wasmtime_wasip2_config_delete ( wasmtime_wasip2_config_t config)

Delete a wasmtime_wasip2_config_t.

Note
This is not needed if the config is passed to wasmtime_component_linker_add_wasip2

◆ wasmtime_wasip2_config_inherit_stdin()

void wasmtime_wasip2_config_inherit_stdin ( wasmtime_wasip2_config_t config)

Configures this context's stdin stream to read the host process's stdin.

Note that concurrent reads of stdin can produce surprising results so when using this it's typically best to have a single wasm instance in the process using this.