Skip to content
pubscout

system_resources

2.0.0, released 5 weeks ago by jonasroussel.com

Access system resources like CPU load and memory usage via dart:ffi.

WASM-ready
$ flutter pub add system_resources
Source repository

What it does

Provides easy access to system resources such as CPU load and memory usage. It calls operating system APIs directly using pure Dart with dart:ffi without needing any bundled native library.

AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to monitor CPU load average within your application.
  • You need to check physical memory usage across desktop or mobile platforms.
  • You want a pure Dart FFI implementation without external C binaries.

Skip it when

  • You are targeting the web platform, where it is not supported.
  • You require deep process-level profiling beyond basic global CPU and memory usage.

Strengths

  • No bundled native library or C compiler required.
  • Supports multiple platforms including Linux, Android, macOS, iOS, and Windows.
  • Optional initialization and simple static API.

Weaknesses

  • Not supported on the web platform.
  • Windows lacks load average support, instead measuring CPU usage since the last call or init.

Setup

Kind
FFI (native library)
Effort
Low
Code generation
No
Direct dependencies
1
import 'package:system_resources/system_resources.dart';

Future<void> main() async {
  await SystemResources.init();

  print('CPU Load Average : ${(SystemResources.cpuLoadAvg() * 100).toInt()}%');
  print('Memory Usage     : ${(SystemResources.memUsage() * 100).toInt()}%');
}

Alternatives

Packages that do the same job and could replace system_resources.

Works with

Packages commonly used together with system_resources: ones it builds on, ones built on it, and its own family.