MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / process_wasix_runtime

Function process_wasix_runtime

src/pglite/postgres_mod.rs:1555–1586  ·  view source on GitHub ↗
(engine: &Engine)

Source from the content-addressed store, hash-verified

1553}
1554
1555fn process_wasix_runtime(engine: &Engine) -> Result<Arc<WasixProcessRuntime>> {
1556 WASIX_PROCESS_RUNTIME
1557 .get_or_init(|| {
1558 let _phase = timing::phase("wasix.runtime_construct");
1559 let tokio_runtime = {
1560 let _phase = timing::phase("wasix.runtime_construct.tokio");
1561 Arc::new(
1562 tokio::runtime::Builder::new_multi_thread()
1563 .enable_all()
1564 .build()
1565 .context("create Tokio runtime for Wasmer/WASIX filesystem")
1566 .map_err(|err| format!("{err:#}"))?,
1567 )
1568 };
1569 let wasix_module_cache = {
1570 let _phase = timing::phase("wasix.runtime_construct.module_cache");
1571 Arc::new(SharedCache::new())
1572 };
1573 let wasix_runtime = {
1574 let _phase = timing::phase("wasix.runtime_construct.pluggable_runtime");
1575 build_wasix_runtime(&tokio_runtime, engine, wasix_module_cache.clone())
1576 };
1577
1578 Ok(Arc::new(WasixProcessRuntime {
1579 tokio_runtime,
1580 wasix_module_cache,
1581 wasix_runtime,
1582 }))
1583 })
1584 .clone()
1585 .map_err(|message| anyhow::anyhow!(message))
1586}
1587
1588struct WasixInstantiateInput<'a> {
1589 runtime: &'a TokioRuntime,

Callers 4

preload_moduleMethod · 0.85
run_split_initdbFunction · 0.85

Calls 3

phaseFunction · 0.85
build_wasix_runtimeFunction · 0.85
buildMethod · 0.80

Tested by

no test coverage detected