You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
embedding CPython in emscripten build requires stringToNewUTF8 symbol #156243
In the PyO3 CI I am testing out building emscripten CPython with 3.15rc1. I get a failure when executing the webassembly module:
warning: stringToNewUTF8 is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='$stringToNewUTF8')
TypeError: stringToNewUTF8 is not a function
at _Py_emscripten_runtime (/home/david/dev/pyo3/target/wasm32-unknown-emscripten/debug/deps/pyo3-a56cdf8abaaca849.js:8007:500)
I can hack around this with a compiler flag in the PyO3 build scripts. Local AI is telling me that CPython might want to consider adding an EM_JS_DEPS declaration near to the above to link the correct symbol without downstream users having to think about it. I guess either that's actually something worth doing, or this issue can be closed.
changed the title [-]embedding CPython in emscripten build requires[/-][+]embedding CPython in emscripten build requires `stringToNewUTF8` symbol[/+]on Aug 22, 2026
Activity
[-]embedding CPython in emscripten build requires[/-][+]embedding CPython in emscripten build requires `stringToNewUTF8` symbol[/+]hoodmane commentedon Aug 22, 2026
I'll try adding
EM_JS_DEPSI'm pretty sure that's a valid approach. Thanks for the report @davidhewittgh-156243: Indicate that emscripten_runtime depends on stringToNewUTF8 (
[3.15] gh-156243: Indicate that emscripten_runtime depends on stringT…
pythongh-156243: Indicate that emscripten_runtime depends on stringTo…