wasmtime_c_api/
wasip2.rs

1#[repr(transparent)]
2pub struct wasmtime_wasip2_config_t {
3    pub(crate) builder: wasmtime_wasi::p2::WasiCtxBuilder,
4}
5
6#[unsafe(no_mangle)]
7pub unsafe extern "C" fn wasmtime_wasip2_config_new() -> Box<wasmtime_wasip2_config_t> {
8    Box::new(wasmtime_wasip2_config_t {
9        builder: wasmtime_wasi::p2::WasiCtxBuilder::new(),
10    })
11}
12
13#[unsafe(no_mangle)]
14pub unsafe extern "C" fn wasmtime_wasip2_config_inherit_stdout(
15    config: &mut wasmtime_wasip2_config_t,
16) {
17    config.builder.inherit_stdout();
18}
19
20#[unsafe(no_mangle)]
21pub unsafe extern "C" fn wasmtime_wasip2_config_delete(_: Box<wasmtime_wasip2_config_t>) {}