-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for this target OS is not implemented yet!
.
#37
Comments
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. |
I am getting the same thing when running on termux in android
I guess since this repo is a dependency, it led me here |
Just saying… |
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) |
Disabling the default feature installed successfully cargo install --no-default-features starship
cargo install --no-default-features bottom |
@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. |
Here it comes for NetBSD :) |
So I'm trying to look into this for OpenBSD, thus far it seems to be implemented by 2 possible mechanisms:
However, I noticed, from what I can tell given that I have never written Rust before, that calculations in order to obtain the battery percentage instead of direct voltage values seem to be implemented by the battery crate itself, and the first interface on OpenBSD, which seems to be the recommended one, reports a battery percentage directly. Therefore, is one preferable over the other? |
@chilledfrogs Just making sure I understand the question correctly:
If all of this is correct, and my understanding of what libraries are used to compile c programs, then you really only have |
@anoduck I assume that any sysctls that can be queried in the usual manner. @chilledfrogs I would be fine either way if the API can be covered reasonably. That said, an additional percent-based API might be useful for also fixing #34. |
NetBSD's APM and OpenBSD APM are probably different and not forcibly compatible. On NetBSD APMd is deprecated and supports no more than the sysmon envsys subsystem. The NetBSD sysmon envsys subsystem is a NetBSD only interface. The envsys interface can cover other types of batteries but I only implemented acpibat batteries because Rust mostly targets works on amd64 and arm64 anyway on this OS at this time which mostly only use acpibat batteries. If the plist (xml) exposed via envsys follows the same format as acpibat for other kinds of batteries, there is possibility to bring support for other types of batteries by just changing one line, but as of now, it is not relevant. The OpenBSD method to get acpi batteries is the syscl. I started working on it and then gave up because rust-analyzer was crashing on OpenBSD and trashing my editor. And I did not want to have to bother with that. |
@anoduck I am talking about the APM ioctl, not the command, hence section 4 of the manual which I mentioned, and I am also talking about the C sysctl call, not the command |
Maybe I explained badly, but the new system is not using the apm ioctl, but the envsys subsystem has its own ioctl.
It is deprecated in the same sense FreeBSD deprecated it (implementation of FreeBSD in this project is using sysctl, OpenBSD has sysctl for acpi batteries as well). https://github.com/starship/rust-battery/blob/main/src/platform/netbsd/sysmon.rs It is BSD, system utilities (within the base) and kernel subsystems are developed together. Saying it is only or not about the userspace tools is not so much relevant. OpenBsd having sysctl for batteries and FreeBSD using such a method, inspiration can be taken on that side. I just think it does not make sense to expect to try to unify with NetBSD. These are different OS after all despite shared roots that now have diverged for a very long time. |
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.
The text was updated successfully, but these errors were encountered: