INNER CODE UNIT · Rust
can_run_engine
wasmCloud/wasmCloud · crates/wash-runtime/src/lib.rs:71
async fn can_run_engine() -> anyhow::Result<()> {
let engine = Engine::builder().build()?;
let http_handler = crate::host::http::DevRouter::default();
let ingress = Ingress::new(http_handler, "127.0.0.1:0".parse()?).await?;
let wasi_config_plugin = DynamicConfig::default();
let host = HostBuilder::new()
.with_engine(engine)
.with_http_handler(Arc::new(ingress))
.with_plugin(Arc::new(wasi_config_plugin))?
.build()?;
let host = host.start().await?;
let req = WorkloadStartRequest {
workload_id: uuid::Uuid::new_v4().to_string(),
workload: Workload {
namespace: "test".to_string(),