28 | {entry.stdin}
29 |
30 | )}
31 | {"stdin" in entry && entry.stdin && entry.allowHtml && (
32 |
39 | )}
40 | {"stdout" in entry && entry.stdout && (
41 |
47 | {entry.stdout}
48 |
49 | )}
50 | {"stderr" in entry && entry.stderr && (
51 |
57 | {entry.stderr}
58 |
59 | )}
60 |
59 | 📖 Read the article
60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /crates/pluginlab/src/wasm_host.rs: -------------------------------------------------------------------------------- 1 | use crate::api::host_api::HostApi; 2 | use crate::api::plugin_api::PluginApi; 3 | use crate::cli::Cli; 4 | use crate::engine::WasmEngine; 5 | use crate::store::WasiState; 6 | use anyhow::Result; 7 | use std::collections::HashMap; 8 | use wasmtime::Store; 9 | use wasmtime_wasi::p2::WasiCtx; 10 | 11 | /// Represents a loaded plugin 12 | pub struct PluginInstance { 13 | pub plugin: PluginApi, 14 | } 15 | 16 | /// The main host that manages plugins and the REPL logic 17 | pub struct WasmHost { 18 | pub store: Store