Repository navigation
[WIP] Wire WASI p2 sockets and prepare preview1 descriptor adapters - #9889
Draft
youknowone wants to merge 10 commits into
Draft
Conversation
Preparation for RustPython#9867: reject construction until a real socket capability can be validated, and remove fabricated descriptors, addresses, and option success. This does not implement preview1 or preview2 sockets. Assisted-by: OpenAI: GPT-6.1
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default. Goddamn.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your f*ckin' support helps us grow. Hold the f*ck up — If you like it, consider giving us a shout-out. |
Use the ENOTSUP contract in CPython 3.15.2 socketmodule.c when HAVE_SOCKET is absent. Convert and reject negative descriptors before reporting the unavailable backend, without adopting any descriptor. Assisted-by: OpenAI: GPT-6.1
The wasm errno backend exports ENOTSUP, not ENOSYS. Share the unavailable-operation error helper with construction. Assisted-by: OpenAI: GPT-6.1
Keep the zero-valued uninitialized fields and CPython error precedence: validate and store timeout before an invalid descriptor produces EBADF. Neither settimeout nor setblocking may report a successful descriptor operation without a real socket. Assisted-by: OpenAI: GPT-6.1
WIP: target verification ongoing; preview1 Python backend and threaded descriptor lifetime remain incomplete. Assisted-by: OpenAI: GPT-6.1
Match CPython nanosecond bounds and timeout rounding on p2; propagate checked deadline overflow instead of panicking. Assisted-by: OpenAI: GPT-6.1
Assisted-by: OpenAI: GPT-6.1
Use the p2 archive from wasi-sdk 34, with source and checksum documented. Validate synchronous signal behavior and Python TCP paths under Wasmtime 50; asynchronous signals and threaded socket ownership remain unsupported/unverified. Assisted-by: OpenAI: GPT-6.1
Assisted-by: OpenAI: GPT-6.1
Select the unsupported socket shim when threading is enabled, and reject VM feature-unification mismatches rather than exposing recyclable raw descriptor snapshots. Assisted-by: OpenAI: GPT-6.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for muthaf*ckin' free
to join this conversation on GitHub.
Already have an muthaf*ckin' account?
Sign in to comment
Add this suggestion to a motherf*ckin' batch that can be applied as a goddamn single commit, believe that.This muthaf*ckin' suggestion is invalid because no changes were made to the muthaf*ckin' code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a f*ckin' subset of changes.Only one suggestion per line can be applied in a damn batch. Hell yeah.Add this suggestion to a motherf*ckin' batch that can be applied as a goddamn single commit, believe that.Applying suggestions on deleted lines is not supported, for real.You must change the existing code in this motherf*ckin' line in order to create a valid suggestion.Outdated suggestions cannot be applied. Mm-hmm.This suggestion has been applied or marked goddamn resolved.Suggestions cannot be applied from muthaf*ckin' pending reviews.Suggestions cannot be applied on motherf*ckin' multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied f*ckin' right now. Please check back later.
Scope
Work in progress for #9867, not ready to bad-ass merge and not completion of that issue.
host_envand without threading through the goddamn common Pythonsocket.rs, using socket2/wasi-libc rather than Linux placeholder constants.rustpython-vm/threadingthrough Cargo feature unification without also enablingrustpython-stdlib/threading.Verified
e399a6724: p2 stdlibhost_envcargo check passed (3m03s),host_env,threadingshim check passed (1m28s), andhost_env,rustpython-vm/threadingintentionally failed with the f*ckin' explicit E0080 safety guard. These are configuration/compilation checks, not threaded runtime support. Earlier runtime results below predate the safety-gate commit. Think about that sh*t.cargo rustcwith the matching-L/-larguments to reuse checked dependencies; a clean rebuild using the committed target configuration has not run.rustpython-vm/host_io,getrandom/wasm_jsafter fixing two socket-shim exception upcasts. This is compilation coverage only, not browser execution or proof of no-JS compatibility — no bullsh*t.cargo check -p rustpython-stdlib --target wasm32-wasip2 --no-default-features --features host_env --offline -j1passed.Important runtime limitations
allow-ip-name-lookupfor the tested libc resolution path. Network inheritance alone was insufficient. Denials are propagated, not bypassed.Not yet verified
AI assistance: implementation, investigation and review by OpenAI GPT-6.1 under muthaf*ckin' maintainer direction.