-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-95451: Update docs for wasm32-emscripten and -wasi platforms #95452
Conversation
tiran
commented
Jul 29, 2022
•
edited by bedevere-bot
Loading
edited by bedevere-bot
- Issue: Document wasm32-emscripten and wasm32-wasi platforms #95451
Co-authored-by: Éric <merwok@netwok.org>
Doc/library/intro.rst
Outdated
PyScript is built on top of Pyodide, which itself is built on top of | ||
CPython and Emscripten. Pyodide provides access to browsers' JavaScript and | ||
DOM APIs as well as limited networking capabilities with JavaScript's | ||
``XMLHttpRequest`` and ``Fetch`` API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking forward to the day when that's just a "browser support module" installable in upstream CPython...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm lobbying for a high level HTTP API in Python core.
Doc/library/intro.rst
Outdated
The properties and behavior of Python on WebAssembly platforms depend on the | ||
`Emscripten`_ or `WASI`_-SDK version, WASM runtimes (browser, NodeJS, `wasmtime`_), | ||
and Python build time flags. WebAssembly, Emscripten, and WASI are evolving. | ||
Some features like networking may be supported in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that Emscripten and WASI runtimes are moving targets, there could at least be unofficial builds of Python build against future versions of emscripten where some of the features marked as unavailable become available. Do we want to somehow flag the difference between "explicitly disabled in Python" vs. "not known to work in current environments"? Maybe we want to add to this paragraph:
"Python features documented as unsupported may in fact work depending on your environment."
But maybe that's too confusing for most users to understand, and something we can address in the future as these things mature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very few features are explicitly disabled. The config.site
files disable a few syscalls that fail tests or make no sense. For example I disabled the effective user/group id function family. Emscripten returns 0, which some code interprets as CAP_SYS_ADMIN
privileges. The config.site
files in Tool/wasm
directory have comments for special cases.
The target audience for the section is "curious users without previous WASM experience". I want to give them some ideas what does not work without going into too many technical details.
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few questions on better explaining confusing or potentially mistyped content, and a bunch of small suggestions mostly fixing grammar and organization issues (including a bunch of identical comma splices), improving phrasing, and a few reST deficiencies.
Misc/NEWS.d/next/Documentation/2022-07-29-23-02-19.gh-issue-95451.-tgB93.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Éric <merwok@netwok.org>
…451.-tgB93.rst Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
GH-95580 is a backport of this pull request to the 3.11 branch. |
…pythonGH-95452) Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Michael Droettboom <mdboom@gmail.com> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM> (cherry picked from commit e3b6ff1) Co-authored-by: Christian Heimes <christian@python.org>
Thank you for your feedback and reviews! |
…5452) Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Michael Droettboom <mdboom@gmail.com> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM> (cherry picked from commit e3b6ff1) Co-authored-by: Christian Heimes <christian@python.org>