Skip to content

Architecture

The package boundary is defined in Core and dart_monty ownership.

graph TD
    A[Dart application] --> B[MontyRuntime]
    B --> C[MontyBridge]
    B --> D[Extensions]
    C --> E[Host functions and OS handlers]
    C --> F[dart_monty_core sessions]
    D --> E
    F --> G[Native worker or Web Worker]

MontyRuntime is the application-level API. Choose it when Python needs Dart capabilities, execution events, or state that spans calls. Applications that need none of those features can use core's pool and session API directly.

A host-function call suspends Python while the bridge dispatches Dart work and then resumes the session. An extension groups those capabilities and participates in attachment, child creation, and disposal.

MontyRuntime, MontyBridge, HostFunction, MontyExtension, and SandboxExtension define ownership, dispatch, capabilities, extensions, and child storage.

See Core and dart_monty ownership for the package boundary, Bridge concurrency for session choices, and Filesystem and workspace policy for sandbox storage guarantees.