stdlibc 0.1.4 copy "stdlibc: ^0.1.4" to clipboard
stdlibc: ^0.1.4 copied to clipboard

C Standard Library - FFI bindings to the GNU C Library on Linux, and the BSD C Library on macOS.

example/example.dart

import 'package:stdlibc/stdlibc.dart';

void main() {
  if (geteuid() == 0) {
    print('WARNING: running as root');
  }

  final utsname = uname();
  if (utsname != null) {
    print('System: ${utsname.sysname} (${utsname.nodename})');
    print('Version: ${utsname.release} (${utsname.machine})');
  }

  final info = sysinfo();
  if (info != null) {
    print('Uptime: ${info.uptime}');
    print('Load average: ${info.loads[0] / (1 << SI_LOAD_SHIFT)}');
  }
}
14
likes
120
pub points
77%
popularity

Publisher

verified publishercanonical.com

C Standard Library - FFI bindings to the GNU C Library on Linux, and the BSD C Library on macOS.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MPL-2.0 (LICENSE)

Dependencies

collection, ffi, meta, path

More

Packages that depend on stdlibc