| Crates.io | simple-home-dir |
| lib.rs | simple-home-dir |
| version | 0.5.2 |
| created_at | 2023-03-31 22:03:38.02533+00 |
| updated_at | 2025-07-26 17:33:12.199784+00 |
| description | Returns the path of the current user's home directory if known. |
| homepage | |
| repository | https://github.com/eschwart/simple-home-dir |
| max_upload_size | |
| id | 826904 |
| size | 2,421 |
Deprecated: This crate is no longer necessary as Rust now provides an official home_dir() method. Use std::env::home_dir() instead.
Simply use the standard library's built-in home_dir method.
pub use std::env::home_dir;
fn main() {
// Unix => /home/jdoe
// Windows => C:\Users\jdoe
let path = home_dir().unwrap();
}