starship / rust-battery

Rust crate providing cross-platform information about the notebook batteries.
https://crates.io/crates/starship-battery
ISC License
18 stars 7 forks source link

`Support for this target OS is not implemented yet!`. #37

Open anoduck opened 1 year ago

anoduck commented 1 year ago

Attempted to install starship for zsh on OpenBSD-CURRENT, and received the following error message: Support for this target OS is not implemented yet!.

Why is it not allowing me to build? OpenBSD runs rust too.

davidkna commented 1 year ago

This crate interfaces with the operating system and needs to be explicitly extended to work with every OS including OpenBSD. Nevertheless, allowing other targets to build with a dummy implementation, by moving errors to the runtime, could be an improvement.

sharunkumar commented 12 months ago

I am getting the same thing when running on termux in android

cargo install bottom

I guess since this repo is a dependency, it led me here

anoduck commented 12 months ago

This crate interfaces with the operating system and needs to be explicitly extended to work with every OS including OpenBSD. Nevertheless, allowing other targets to build with a dummy implementation, by moving errors to the runtime, could be an improvement.

Just saying… The later solution would be more efficient use of resources. To my understanding and to my experience, OpenBSD is more likely to be run on a desktop than a laptop. This is often due to hardware compatibility issues (or was in the past), and the desire to prioritize speed and usability over security and… whatever… This is just IMHO. Take it for what it is worth.

naguam commented 4 months ago

I am getting the same thing when running on termux in android

cargo install bottom

I guess since this repo is a dependency, it led me here

I think that now rust-battery is an optional dependency of bottom.

I tried to run bottom on NetBSD though and even if it build well it seems its not the only thing missing to make it work.

Bottom needs full porting at least on NetBSD (I don't know for OpenBSD but this might be similar, just try)

ahaoboy commented 3 months ago

Disabling the default feature installed successfully

cargo install --no-default-features starship

cargo install --no-default-features bottom
anoduck commented 2 months ago

@sharunkumar Termux is not containerized or virtualized. Meaning, Termux is still dependent on the sub-framework of android. While this normally would not cause an issue, in the case of accessing device peripherals, this would cause difficulties. As the two are differently structured and use different labeling schemes.

@naguam Yeah, same here. Bottom looks awesome, but does not finish building without error. NetBSD is a beautiful OS. Enjoy it.

naguam commented 2 months ago

https://github.com/starship/rust-battery/pull/69

Here it comes for NetBSD :)