Status of WASM in CPython's `main` branch

Paul has created bindings to emscripten and browser API that do not need external JS and TypeScript files, emscripten embed.

The tricky bit is probably having enough around and working to load that package at run time – is dynamic linking working enough in upstream CPython to load an extension module?

Dynamic linking in CPython upstream works – but not with threading enabled. Proxy to pthread + side_module sometimes crashes in unpredicable ways. I have not figured out why Python under Node crashes. It looks like WASM memory corruption to me.

Why do we need dynamic linking anyway? What prevents us from linking the JS bridge as a static module?

1 Like