Skip to main content

pollux_polyglot_flutter_adapter 0.1.0 copy "pollux_polyglot_flutter_adapter: ^0.1.0" to clipboard
pollux_polyglot_flutter_adapter: ^0.1.0 copied to clipboard

Official Flutter and Dart adapter for Pollux Core deterministic authority sandboxing and capability evaluation.

example/main.dart

// ignore_for_file: avoid_print

import 'package:pollux_polyglot_flutter_adapter/pollux_polyglot_flutter_adapter.dart';

void main() {
  const manifest = '''
version: 1
filesystem:
  read:
    - ./assets
    - /tmp
''';

  final engine = PolluxEngine.load(manifest);

  print('Pollux ABI Version: ${engine.abiVersion}');
  print('Pollux Core Version: ${engine.coreVersion}');

  // Evaluate permitted filesystem read
  final opRead = Operation.fileRead('./assets');
  final resultRead = engine.evaluate(opRead);

  print(
      'Read Verdict: ${resultRead.outcome} (Allowed: ${resultRead.isAllowed})');

  // Evaluate denied filesystem write
  final opWrite = Operation.fileWrite('./assets');
  final resultWrite = engine.evaluate(opWrite);

  print(
      'Write Verdict: ${resultWrite.outcome} (Allowed: ${resultWrite.isAllowed})');

  engine.dispose();
  print('Engine disposed successfully.');
}
1
likes
160
points
126
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Official Flutter and Dart adapter for Pollux Core deterministic authority sandboxing and capability evaluation.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#security #sandboxing #authority #ffi #polyglot

License

MIT (license)

Dependencies

ffi, flutter

More

Packages that depend on pollux_polyglot_flutter_adapter