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

Native FFI backend for dart_monty — Dart/Flutter bindings for Monty, a Rust-built embeddable sandbox running a restricted subset of Python.

dart_monty_ffi #

Part of dart_monty — Dart and Flutter bindings for Monty, a Rust-built embeddable sandbox that runs a restricted subset of Python.

Live Demo | GitHub | Monty (upstream)

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
0
points
462
downloads

Publisher

unverified uploader

Weekly Downloads

Native FFI backend for dart_monty — Dart/Flutter bindings for Monty, a Rust-built embeddable sandbox running a restricted subset of Python.

Repository (GitHub)
View/report issues

Topics

#python #sandbox #ffi #interpreter

License

unknown (license)

Dependencies

dart_monty_platform_interface, ffi

More

Packages that depend on dart_monty_ffi