| Crates.io | app-memory-usage-fetcher |
| lib.rs | app-memory-usage-fetcher |
| version | 0.3.0 |
| created_at | 2025-02-17 21:23:23.283115+00 |
| updated_at | 2025-12-21 17:46:48.085374+00 |
| description | Query a supported operating system to get the amount of memory used by the current Rust application. |
| homepage | |
| repository | https://github.com/rjzak/app-memory-usage-fetcher |
| max_upload_size | |
| id | 1559355 |
| size | 25,051 |
A super simple crate which queries the supported operating system for the number of bytes used. For Unix-like systems, rusage.ru_maxrss is used. If your desired operating system isn't supported, please file an issue.
Additionally, there are helper functions which return the value as Kilo-/Mega-/Giga-/Tera- bytes where the values are based on 1024 bytes = 1 kilobyte.
This crate was created after trying to find this functionality from an existing crate, and instead I found instances of people asking for it. So I decided to make it. This can be helpful, such as trying to see if code changes result in less memory usage, for example.
Operating Systems:
Unsupported operating systems fail gracefully with a reported usage of None and a compiler warning.