| Language | Status | Runs as | Start with | Interop |
|---|---|---|---|---|
| JavaScript | Supported | Script | elide app.js, elide -s CODE | Python: --interop; WASM: no flag |
| TypeScript | Supported | Script, types stripped | elide app.ts, elide -l ts -s CODE | As JavaScript |
| Python | Experimental | Python 3.13 | elide app.py, elide python -m MOD | JavaScript: --interop |
| WebAssembly | Experimental | WASI Preview 1 command | elide app.wasm (_start or _main) | From JS/TS, no flag |
| Java, Kotlin | Supported | Compiled, run on the bundled JDK | elide run Main.kt, elide.pkl projects | None |
| Pkl | Supported | Configuration | elide.pkl manifests | None |
elide info lists the languages in your binary; elide setup python adds Python. Per-language pages:
JavaScript and TypeScript, Python, Java and Kotlin,
WebAssembly.
Python calling JavaScript
# sum.py
from elide import js
print(js("[1,2,3].reduce((a,b)=>a+b,0)"))elide --interop python sum.py6JavaScript importing Python
# mod.py
def greet(name):
return f"hello {name}"// main.mjs
import mod from "./mod.py";
console.log(mod.greet("elide"));elide --interop main.mjshello elideImport the default export; it is the Python module. Use an .mjs entry.
Without --interop
Each program runs only its entry language, plus WebAssembly for JS/TS. Calls between languages fail:
| Program | Error |
|---|---|
sum.py | ValueError: polyglot language 'js' not found |
main.mjs | Cannot import 'mod.py': JavaScript entries run without Python. Re-run with --interop to use it. |
Pass --interop only to programs that call between languages. Under --interop, Python threads fail with
Creating threads is not allowed.
JavaScript and WebAssembly
import { add } from "./math.wasm";
console.log(add(1, 2));.wasm imports and the WebAssembly API work in every JS and TS program. When Python is installed, modules that use
SIMD instructions are rejected with Vector instructions are not enabled.
In the REPL
The REPL shares values across languages without --interop; see Interactive REPL.