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

Method preload_module

src/pglite/postgres_mod.rs:802–815  ·  view source on GitHub ↗
(module_path: &std::path::Path)

Source from the content-addressed store, hash-verified

800
801impl PostgresMod {
802 pub(crate) fn preload_module(module_path: &std::path::Path) -> Result<()> {
803 let runtime_root = module_path
804 .parent()
805 .and_then(Path::parent)
806 .context("runtime module path must be under bin/pglite")?;
807 let (engine, _) = aot::load_runtime_module()?;
808 let process_runtime = process_wasix_runtime(&engine)?;
809 preload_runtime_side_modules(
810 &process_runtime.tokio_runtime,
811 &engine,
812 &process_runtime.wasix_module_cache,
813 runtime_root,
814 )
815 }
816
817 pub(crate) fn new_prepared(paths: PglitePaths, runtime_layout: RuntimeLayout) -> Result<Self> {
818 Self::new_prepared_with_config(

Callers

nothing calls this directly

Calls 3

load_runtime_moduleFunction · 0.85
process_wasix_runtimeFunction · 0.85

Tested by

no test coverage detected