-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededlinuxmacosrustwindows
Description
( Help wanted )
treefetch in its current state only supports Linux. Use Rust conditional compilation in the fields.rs file to write separate code for each OS; Windows and macOS. You may also modify the main.rs a bit if needed.
The fetch information you need to implement for either Windows or macOS are:
- username / hostname
- OS name
- kernel (if applicable)
- Shell name
- Uptime
- Memory usage
You can make a PR implementing only Windows or only macOS support for now if you want.
I suggest doing something like this:
#[cfg(target_os = "linux")]
pub fn get_memory() -> Result<String, String> {
...
}
#[cfg(target_os = "macos")]
pub fn get_memory() -> Result<String, String> {
...
}
#[cfg(target_os = "windows")]
pub fn get_memory() -> Result<String, String> {
...
}EdenQwQ and aliesbelik
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededlinuxmacosrustwindows