INNER CODE UNIT · Rust
marginalia_home
shenmintao/marginalia · desktop/src-tauri/src/lib.rs:56
fn marginalia_home() -> PathBuf {
std::env::var_os("MARGINALIA_HOME")
.map(PathBuf::from)
.unwrap_or_else(|| home_dir().join("Marginalia"))
}
#[derive(Debug, Deserialize)]
struct RuntimeManifest {
/// Path to the python interpreter relative to the backend dir.
python: String,
}
/// Locate the bundled Python interpreter under the resource dir.
///
/// The `bundle.resources` glob in `tauri.conf.json` is `resources/backend/**/*`
/// — Tauri preserves the leading `resources/` path segment when staging files
/// into the bundle, so at runtime the tree lives at
/// `<resource_dir>/resources/backend/`. The portable-zip layout matches this.