Language plugins

Iodide supports programming languages other than JavaScript through the use of language plugins.

Languages that are mature and well supported automatically load when you create and run a IOMD chunk for that language. These are called "built-in" because Iodide knows about them, even if support is loaded dynamically only when needed. Other languages require the use of a language plugin chunk, described below.

Not all language plugins have the same level of interoperability between JavaScript and the plugin language. We've defined the following approximate levels of support to make it easier to know what to expect.

Project Language Level 1 Level 2 Level 3 Level 4 Built-in
Pyodide Python partial
AssemblyScript AssemblyScript
Lua Lua
Opal Ruby
Julide Julia
Domical OCaml
PlantUml PlantUml

(We try to keep the above table up-to-date, but things fall through the cracks. Let us know on GitHub if you see anything needs updating).

Using a custom language plugin

The language plugin is specified by a IOMD chunk containing a JSON string with the following format:

%% plugin

{
  "languageId": "jsx",
  "displayName": "React JSX",
  "codeMirrorMode": "jsx",
  "keybinding": "x",
  "url": "https://raw.githubusercontent.com/hamilton/iodide-jsx/master/docs/evaluate-jsx.js",
  "module": "jsx",
  "evaluator": "evaluateJSX",
  "pluginType": "language"
}

The individual fields are described below: