Polyglot Interop

Elide runs multiple languages on one runtime, and code in one language can call into another. Cross-language interop is enabled by default for elide run: the runtime grants full polyglot access (PolyglotAccess.ALL), so Python and JavaScript values can cross the language boundary.

Python calling JavaScript

From Python, use the built-in elide module (from elide import js, bind, poly) to evaluate JavaScript and bind values across languages. This works under elide run.

Notes

The JavaScript-side Polyglot global is available only in the interactive REPL — it is not installed under elide run. When structuring cross-language code, prefer driving interop from the language whose host bindings are available in your run mode (from Python, via the elide module shown above).