mirror of https://github.com/pyodide/pyodide.git
1.3 KiB
1.3 KiB
The Pyodide runtime consists of the following components, sorted in terms of initialization-time (or import-time) dependencies.
- CPython
- The py/_pyodide package which is a Python package with pure Python code available in the inner stage of the Pyodide bootstrap process.
- The core/pyodide code, implemented in a mix of C and JavaScript, which embeds the CPython interpreter in an emscripten application. This relies on py/pyodide and js/pyodide at runtime. The final stage of initialization is to import py/pyodide.
- The py/pyodide package which has Python code that is needed for the outer stage of the Pyodide bootstrap process. py/pyodide relies on core/pyodide at import time and relies on js/pyodide at runtime.
- The js/pyodide package which defines the JavaScript public API, sets up the
process of loading the core/pyodide emscripten application + CPython
interpreter, and then completes the bootstrap by injecting the js/pyodide
API into the Python
sys.modules
. - The packages directory, which contains a large number of CPython packages built to run in Pyodide.
One of our long-term organizational goals is to carefully organize core/pyodide, py/_pyodide, py/pyodide, and js/pyodide to clarify which functionality is not part of runtime dependencies that define Pyodide's core behavior.