python-wasm
python-wasm copied to clipboard
Build scripts and configuration for building CPython for Emscripten
I'd like to provide a way to download arbitrary ZIP archives from PyPI and install them in the WASM environment. One way would be to just hit the PyPI API...
* build libffi from https://github.com/hoodmane/libffi-emscripten * ``cp /opt/libffi-emscripten/lib/libffi.a /emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/`` * ``cp /opt/libffi-emscripten/include/ffi* /emsdk/upstream/emscripten/cache/sysroot/include/`` * Build with ``./build-python-emscripten-node.sh --enable-wasm-dynamic-linking`` * Add ``*shared*\n_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c -lffi`` to ``Module/Setup.local``
Hi, I'm trying to figure out how can I use the compiled WASI artifact, I tried the following but it threw me an exception; 1. ```cli $ wasmtime run --env...
Emscripten has an asyncify pass which can allow synchronous C code yield to the JS event loop and even block on an async JS call. I expect asyncifying the core...
It took me a while to figure out what to hook into, but I believe I finally got standard input working the way I'd expect it to. Improvements: 1. When...
* LTO (link time optimization) may generate faster interpreter * ``-Os`` instead of ``-O3`` / ``-O2`` generates much smaller code. Let's check if it makes a noticeable performance impact
A ticket to collect issues and bugs with Emscripten. We want to report them upstream eventually. - [x] Emscripten defines ``IPPROTO_SCTP``, but ``socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP)`` causes an abort, https://github.com/emscripten-core/emscripten/pull/16479 -...
Emscripten's ``fstat()`` fails with FileNotFoundError when the underlying file has been unlinked. The behavior breaks a handful of test cases. ```#python import os f = open("testfile", "w+") f.write("test") f.seek(0) print(os.fstat(f.fileno()))...
The build scripts now load all of the modules that aren't already removed from a zip file, but one thing we could do is lazy load things instead, only putting...