Status of WASM in CPython's `main` branch

It is true however that if the foreign function interface were compiled into the main module, the from js import blah magic could in principle even be added in a pure Python extension module if you wanted that.

That’s exactly the point. And the first use case is the cpython testsuite in the browser ( could be in Ethan’s buildbot maybe too with some headless browser ) as it is using those modules to set things up speaking directly to emscripten “os” api without need for C or javascript.

It would also allow for people to have documentation closer to python usecases as emscripten’s one is C oriented.

sidenote: those modules i’ve slightly modified for 3.11 come from Panda3D webgl-port engine and are already used and tested since patched 3.8, are only 2 commented C files with no deps that are meant to be included directly in python main.