Skip to content

Runtime Comparison

tywrap supports five runtime configurations. Choose based on your environment.

Feature Matrix

FeatureNode.jsBunDeno (local)Browser (Pyodide)HTTP
Python subprocess
Deno Deploy / serverless
Apache Arrow transport
Virtual environment supportServer-side
Process pooling (experimental)
Development hot reloadManual bridge reloadExternal
Tested in CIMocked

Import Paths

RuntimeImport
Node.jsimport { NodeBridge } from 'tywrap/node'
Bunimport { NodeBridge } from 'tywrap/node'
Denoimport { NodeBridge } from 'npm:tywrap'
Browserimport { PyodideBridge } from 'tywrap/pyodide'
HTTPimport { HttpBridge } from 'tywrap/http'

Decision Guide

Do you need subprocess-based Python execution?
├── Yes → Does your environment support subprocess?
│   ├── Node.js or Bun → Use NodeBridge (import from 'tywrap/node' or 'tywrap')
│   ├── Deno (local) → Use NodeBridge with --allow-run=python3
│   └── Deno Deploy / serverless → Continue ↓
└── No (browser, edge, serverless) →
    ├── Can you load ~50MB WebAssembly? → Use PyodideBridge
    └── Need heavy Python libs or can't load WASM → Use HttpBridge

Bridge Reference

BridgeExportGuide
NodeBridgetywrap/nodeNode.js · Bun · Deno
PyodideBridgetywrap/pyodideBrowser
HttpBridgetywrap/httpHTTP

Released under the MIT License.