Skip to content
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

Read sensor data from rust #1

Open
Magellol opened this issue Apr 10, 2023 · 0 comments
Open

Read sensor data from rust #1

Magellol opened this issue Apr 10, 2023 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@Magellol
Copy link
Owner

Magellol commented Apr 10, 2023

As mentioned in the readme section one of my concerns is that I rely on two hard dependencies that must run on the host machine to read sensor data (CPU, GPU, etc..) and I so far didn't find anything conclusive I could do in Rust specifically.

We can use this issue to gather and brainstorm ideas to pull this off from rust directly.

Current approach

The current approach requires running HWiNfo and remotehwinfo separately from this application. HWiNfo exposes sensor data over a shared memory access (don't quote me on that) and remotehwinfo makes it accessible over the network which this app pulls.

Dream

The dream would be to not having to rely on any external dependencies and use an intrinsic rust implementation to read the data but as I found out, this isn't straightforward.

Ideas

Here's a list of ideas I've tried and I want to keep trying to pull this off:

  • I've tried to use the systemstats crate but this doesn't expose anything related to GPU
  • I've looked at an alternative to NVML for AMD cards and I've found ROCm but there is no rust implementation/bindings at the moment.
  • I've tried to use windows-rs and the performance counter API but It didn't seem like thermal information was exposed. Note that I also tried the winapi crate but same issue.
  • I've entertained the idea of rewriting the backend using .NET and use LibreHardwareMonitor. I haven't explored this too deeply as I'd like to stay in Rust land if possible.
  • I've tried the psutil rust crate but same issue with GPU data not exposed.

At this point, my best idea is to rewrite using .NET but I'm very much not familiar with its ecosystem 🤷

Any idea is welcome!

@Magellol Magellol added the help wanted Extra attention is needed label Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant