os 0.1.1 os: ^0.1.1 copied to clipboard
Access to operating system APIs (using 'dart:ffi'). Virtual memory management, IPC pipes, file permissions, etc.
import 'package:os/virtual_memory.dart';
void main() {
// Allocate virtual memory
final memory = VirtualMemory.allocate(1024);
memory.asUint8List[0] = 42;
// Make the memory read-only
memory.setProtection(VirtualMemory.protectionWrite);
// Any mutation will result in a crash now
memory.asUint8List[0] = 99;
}