swc_plugin_runner::wasix_runtime

Function build_wasi_runtime

source
pub fn build_wasi_runtime(
    _fs_cache_path: Option<PathBuf>,
) -> Option<Arc<dyn Runtime + Send + Sync>>
Expand description

Construct a runtime for the wasix engine depends on the compilation features.

This is mainly for the case if a host already sets up its runtime, which makes wasix initialization fails due to conflicting runtime. When specified, instead of using default runtime it’ll try to use shared one.