Skip to main content

Mountain/IPC/WindServiceAdapters/
WindEnvironmentService.rs

1#![allow(non_snake_case)]
2
3//! Wind-shaped environment-variable accessor. Reads
4//! `APP_ROOT` / `USER_DATA_PATH` from the process env so Wind's
5//! desktop bootstrap can stay agnostic to the Tauri side.
6
7pub struct Struct {}
8
9impl Struct {
10	pub fn new() -> Self { Self {} }
11
12	pub async fn get_app_root(&self) -> Result<String, String> { std::env::var("APP_ROOT").map_err(|e| e.to_string()) }
13
14	pub async fn get_user_data_path(&self) -> Result<String, String> {
15		std::env::var("USER_DATA_PATH").map_err(|e| e.to_string())
16	}
17}