MCPcopy Index your code
hub / github.com/RustyStarX/RustyStar

github.com/RustyStarX/RustyStar @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
71 symbols 114 edges 29 files 11 documented · 15%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

RustyStar

EnergyStar alernative in Rust.

Bundle instructions

NOTE: You must have MSVC for ARM64 and x86/x64 installed.

To generate msi installer with cargo-wix and WiX Toolset v3.14, run:

nu bundle.nu

Suggested CPU

reference

  • Intel: 10gen or newer
  • AMD: Ryzen 5000 Series or newer
  • Qualcomm: Basically all

I only want to throttle blacklisted ones

RustyStar now supports configuration.

Locate to %AppData%/RustyStarX/RustyStar/config and open config.toml,

disable listen_foreground_events and switch mode of listen_new_process to "blacklist_only", configure the blacklist.

Check wiki page of configuration for more details.

Installation

Github Release

If you want a console application without tray icon and automatic auto launch with system,

download the *-pc-windows-msvc.tar.gz depends on your CPU arch.

Otherwise, download the RustyStar-0.1.*-*.msi, which hides program window and only write to logs.

Roadmap

  • [x] Multi Window support
  • [x] Child processes support
  • [x] Direct child processes
  • [x] Process tree walking
  • [x] Event-based foreground window boost
  • [x] Event-based throttle for all new processes
  • [x] Recover processes on exit
  • [x] Ctrl-C handle
  • [ ] windows wm_close event handle
    • [x] Implement hide to tray icon
  • [x] Support UWP applications
  • [x] Support SYSTEM privileged processes

    You must run RustyStar.exe as administrator to throttle them!

  • [x] Configurable whitelist and blacklist

What is the efficiency mode?

The "Efficiency mode" in task manager does two things on a process:

  • Enable EcoQoS
  • Change base priority to IDLE

The latter is not always useful, especially when we throttle mostly all processes. And the former requires hardware support to perform the best effect.

EcoQoS was first introduced in Windows 10 Preview Build 21359.

The main impact from EcoQoS are: - Energy efficiency & Sustainability - Reduced heat and fan noise (where this project actually care)

What does EcoQoS actually do?

According to MSDN, Eco QoS level means:

Always selects most efficient CPU frequency and schedules

And referring to Optimizing Software for x86 Hybrid Architecture,

Similar to background threads, eco threads are also dynamically placed on the Efficient cores.

Non-goals

  • Useless bloated GUI
  • Power mode awareness, e.g. pause & recover on AC supply
  • Extremely lightweight binary

Extension points exported contracts — how you extend this code

ProcessInfo (Interface)
(no doc) [2 implementers]
rustystar/src/utils/proc_tree/mod.rs

Core symbols most depended-on inside this repo

toggle_efficiency_mode_handle
called by 8
win32-ecoqos/src/thread.rs
toggle_efficiency_mode
called by 4
win32-ecoqos/src/thread.rs
whitelisted
called by 4
rustystar/src/bypass/mod.rs
toggle_all
called by 3
rustystar/src/utils/mod.rs
find_thread_by_name
called by 2
win32-ecoqos/src/utils/thread.rs
next
called by 2
win32-ecoqos/src/utils/thread.rs
encode_path
called by 2
rustystar/src/tray.rs
process_child_process
called by 2
rustystar/src/utils/mod.rs

Shape

Function 42
Method 16
Class 10
Enum 2
Interface 1

Languages

Rust100%

Modules by API surface

win32-ecoqos/src/utils/thread.rs7 symbols
rustystar/src/utils/proc_tree/mod.rs7 symbols
rustystar/src/config/mod.rs7 symbols
win32-ecoqos/benches/bench.rs6 symbols
win32-ecoqos/src/utils/process.rs5 symbols
win32-ecoqos/src/thread.rs4 symbols
win32-ecoqos/src/process.rs4 symbols
rustystar/src/events/mod.rs4 symbols
rustystar/src/utils/mod.rs3 symbols
rustystar/src/privilege/mod.rs3 symbols
rustystar/src/config/merge.rs3 symbols
listen-new-proc/src/listen.rs3 symbols

For agents

$ claude mcp add RustyStar \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact