MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / configure_runtime_loader_env

Function configure_runtime_loader_env

crates/openshell-driver-vm/src/runtime.rs:919–931  ·  view source on GitHub ↗
(runtime_dir: &Path)

Source from the content-addressed store, hash-verified

917
918#[cfg(target_os = "macos")]
919fn configure_runtime_loader_env(runtime_dir: &Path) -> Result<(), String> {
920 let existing = std::env::var_os("DYLD_FALLBACK_LIBRARY_PATH");
921 let mut paths = vec![runtime_dir.to_path_buf()];
922 if let Some(existing) = existing {
923 paths.extend(std::env::split_paths(&existing));
924 }
925 let joined =
926 std::env::join_paths(paths).map_err(|e| format!("join DYLD_FALLBACK_LIBRARY_PATH: {e}"))?;
927 unsafe {
928 std::env::set_var("DYLD_FALLBACK_LIBRARY_PATH", joined);
929 }
930 Ok(())
931}
932
933#[cfg(target_os = "linux")]
934fn configure_runtime_loader_env(runtime_dir: &Path) -> Result<(), String> {

Callers 1

run_libkrun_vmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected