Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/crates/wasi-common/tests/all/main.rs
1692 views
1
use anyhow::Result;
2
use std::path::Path;
3
use tempfile::TempDir;
4
use wasi_common::pipe::WritePipe;
5
use wasmtime::{Linker, Module, Store};
6
7
pub fn prepare_workspace(exe_name: &str) -> Result<TempDir> {
8
let prefix = format!("wasi_common_{exe_name}_");
9
let tempdir = tempfile::Builder::new().prefix(&prefix).tempdir()?;
10
Ok(tempdir)
11
}
12
13
macro_rules! assert_test_exists {
14
($name:ident) => {
15
#[expect(unused_imports, reason = "just here to ensure a name exists")]
16
use self::$name as _;
17
};
18
}
19
20
mod async_;
21
mod sync;
22
23