Open c-x opened 4 months ago
I believe @brettcannon is planning to add zlib
to the WASI build of CPython, along with other native modules such as bzip2
, etc.
Regarding requests
: I agree that this would be a great library to support, but it's going to take more than adding zlib
to support it. I assume it also uses the ssl
module, which is going to be way tougher to support given that Wasm doesn't currently have constant time operations, which means OpenSSL is vulnerable to timing attacks when compiled to Wasm. I think the most practical way to support requests
is to port it to use wasi:http
instead of sockets on WASIp2, which someone would need to volunteer to do.
I believe @brettcannon is planning to add
zlib
to the WASI build of CPython, along with other native modules such asbzip2
, etc.
Correct, it's planned: https://opensource.snarky.ca/Python/WASI#Plans .
@brettcannon @dicej do you have any ETA/objective for this fix?
@c-x No ETA from me. The objective is to get zlib statically compiled into the binary I build for CPython via https://github.com/python/cpython/blob/main/Tools/wasm/wasi.py .
Hi!
Apparently cpython was compiled without
zlib
support, which is required by the requests library (probably the most used/famous http library in python).Issue probably linked to https://github.com/bytecodealliance/componentize-py/issues/64