Skip to content

[mypyc] lib-rt base64: support pyodide for Python 3.12#20342

Merged
ilevkivskyi merged 1 commit into
python:masterfrom
mr-c:pyodide_2024_py312
Dec 1, 2025
Merged

[mypyc] lib-rt base64: support pyodide for Python 3.12#20342
ilevkivskyi merged 1 commit into
python:masterfrom
mr-c:pyodide_2024_py312

Conversation

@mr-c

@mr-c mr-c commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

Fixes the issue reported at mypyc/librt#14 (comment)

For Python 3.12, the pyodide_2024_0 ABI requires emscripten 3.1.58, which uses an older version of SIMDe that doesn't include all the NEON 64-bit intrinsics we need.

So we use the 32-bit NEON intrinsics implementation of base64 for Pyodide on Python 3.12, and use the 64-bit NEON intrinsics implementations of base64 for Pyodide on Python 3.13.

Pyodide for Python 3.13, the pyodide_2025_0 ABI, uses emscripten 4.0.9

Emscripten versdion 3.1.63 appears to be the first version with the updated SIMDe versions:

emscripten-core/emscripten@6223c43

For Python 3.12, pyodide requires emscripten 3.1.{46,52,58}, which uses an older
version of SIMDe that doesn't include all the NEON 64-bit intrinsics we need.

So we use the 32-bit NEON intrinsics implementation of base64 for Pyodide on
Python 3.12, and use the 64-bit NEON intrinsics implementations of
base64 for Pyodide on Python 3.13.

Pyodide for Python 3.13 uses emscripten 4.0.{6,8,9}

Emscripten versdion 3.1.63 appears to be the first version with the
updated SIMDe versions:

emscripten-core/emscripten@6223c43
@mr-c

mr-c commented Dec 1, 2025

Copy link
Copy Markdown
Contributor Author

I tested locally with the librt smoke tests using pyodide & Python 3.13 and Python 3.12 😃

@mr-c

mr-c commented Dec 1, 2025

Copy link
Copy Markdown
Contributor Author

cc @ilevkivskyi @emmatyping @JukkaL

@ilevkivskyi ilevkivskyi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@mr-c

mr-c commented Dec 1, 2025

Copy link
Copy Markdown
Contributor Author

Thank you @ilevkivskyi

test builds are running over in the librt repo: https://github.com/mypyc/librt/actions/runs/19826036041/job/56799561968?pr=19

@ilevkivskyi ilevkivskyi merged commit ad0f41e into python:master Dec 1, 2025
13 checks passed
@mr-c mr-c deleted the pyodide_2024_py312 branch December 1, 2025 14:54
@github-project-automation github-project-automation Bot moved this from Todo to Done in GC-Content-Calculator Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants