dart_monty_ffi 0.6.0 copy "dart_monty_ffi: ^0.6.0" to clipboard
dart_monty_ffi: ^0.6.0 copied to clipboard

Native FFI backend for dart_monty, pure Dart bindings for Monty — a restricted sandboxed Python interpreter built in Rust.

dart_monty_ffi #

Part of dart_monty — pure Dart bindings for Monty, a restricted, sandboxed Python interpreter built in Rust.

Live Demo | GitHub | Monty

Pure Dart native FFI implementation of dart_monty. Wraps the Rust libdart_monty_native shared library via dart:ffi, providing synchronous bindings to the Monty sandboxed Python interpreter.

This package has no Flutter dependency and can be used in CLI tools, server-side Dart, or any Dart project.

  • Flutter apps should import dart_monty instead — the federated plugin selects the correct backend automatically.
  • Pure Dart projects (CLI, server) can depend on this package directly to run Python via the native Rust library.

Architecture #

Dart -> NativeBindingsFfi (dart:ffi)
  -> DynamicLibrary.open(libdart_monty_native)
    -> 17 extern "C" functions (Rust)

Key Classes #

Class Description
NativeBindings Abstract interface over the 17 native C functions
NativeBindingsFfi Concrete FFI implementation with pointer lifecycle management
MontyFfi MontyPlatform implementation using NativeBindings
NativeLibraryLoader Platform-aware library path resolution

See the main dart_monty repository for full documentation.

0
likes
160
points
394
downloads

Publisher

unverified uploader

Weekly Downloads

Native FFI backend for dart_monty, pure Dart bindings for Monty — a restricted sandboxed Python interpreter built in Rust.

Repository (GitHub)
View/report issues
Contributing

Topics

#python #sandbox #ffi #interpreter

Documentation

API reference

License

MIT (license)

Dependencies

dart_monty_platform_interface, ffi

More

Packages that depend on dart_monty_ffi