2021-05-05 13:42:15 +00:00
|
|
|
The Pyodide runtime consists of the following components, sorted in terms of
|
|
|
|
initialization-time (or import-time) dependencies.
|
|
|
|
|
|
|
|
1. CPython
|
2022-01-10 21:47:59 +00:00
|
|
|
2. The py/\_pyodide package which is a Python package with pure Python code
|
2022-03-08 05:51:20 +00:00
|
|
|
available in the inner stage of the Pyodide bootstrap process.
|
2021-09-29 08:01:53 +00:00
|
|
|
3. The core/pyodide code, implemented in a mix of C and JavaScript, which embeds
|
2021-05-05 13:42:15 +00:00
|
|
|
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.
|
|
|
|
4. 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.
|
2021-09-29 08:01:53 +00:00
|
|
|
5. The js/pyodide package which defines the JavaScript public API, sets up the
|
2021-05-05 13:42:15 +00:00
|
|
|
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`.
|
|
|
|
6. 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,
|
2022-01-10 21:47:59 +00:00
|
|
|
py/\_pyodide, py/pyodide, and js/pyodide to clarify which functionality is not part of
|
2021-05-05 13:42:15 +00:00
|
|
|
runtime dependencies that define Pyodide's core behavior.
|