Thankfully this was a lot easier than tracing hiwire keys. 

I located one actual leak: if an error is thrown during `to_js` it would forget to free `proxies`. Other than that, I fixed a few "dumb leaks" in `api.js` where we leak the methods like `eval_code` or `find_imports`. So the code was already in surprisingly good shape in this way.

It's still possible that we leak some Python objects somehow, but this is as good as we can do for systematic checks short of compiling Python itself with `TRACE_MALLOC`.
Eliminate pyproxy leaks. Thankfully this was a lot easier than tracing hiwire keys. 

I located one actual leak: if an error is thrown during `to_js` it would forget to free `proxies`. Other than that, I fixed a few "dumb leaks" in `api.js` where we leak the methods like `eval_code` or `find_imports`. So the code was already in surprisingly good shape in this way.

It's still possible that we leak some Python objects somehow, but this is as good as we can do for systematic checks short of compiling Python itself with `TRACE_MALLOC`.
# js/pyodide

The Javascript code in this folder is responsible for the following tasks:

1. Defines the public Javascript API
   - Package loading code to allow loading of other Python packages.
   - Can load micropip.py to bootstrap loading of pure Python wheels
2. Loads the CPython interpreter and the core/pyodide emscripten application
   which embeds the interpreter.
3. Injects the js/pyodide Javascript API into sys.modules. This is the final
   runtime dependency for core/pyodide & py/pyodide, so after this step the
   interpreter is fully up and running.

# js/pyodide

The Javascript code in this folder is responsible for the following tasks:

1. Defines the public Javascript API
   - Package loading code to allow loading of other Python packages.
   - Can load micropip.py to bootstrap loading of pure Python wheels
2. Loads the CPython interpreter and the core/pyodide emscripten application
   which embeds the interpreter.
3. Injects the js/pyodide Javascript API into sys.modules. This is the final
   runtime dependency for core/pyodide & py/pyodide, so after this step the
   interpreter is fully up and running.
