stdlibc 0.0.2+1 copy "stdlibc: ^0.0.2+1" to clipboard
stdlibc: ^0.0.2+1 copied to clipboard

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

stdlibc.dart #

Tests codecov

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

import 'package:stdlibc/stdlibc.dart';

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

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

  final info = sysinfo();
  print('Uptime: ${info.uptime}');
  print('Load average: ${info.loads[0] / (1 << SI_LOAD_SHIFT)}');
}
16
likes
0
pub points
75%
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

License

unknown (LICENSE)

Dependencies

collection, ffi, meta, path

More

Packages that depend on stdlibc