René's URL Explorer Experiment


Title: Add opt-in WASIX TCP and UDP socket support by youknowdot · Pull Request #9809 · RustPython/RustPython · GitHub

Open Graph Title: Add opt-in WASIX TCP and UDP socket support by youknowdot · Pull Request #9809 · RustPython/RustPython

X Title: Add opt-in WASIX TCP and UDP socket support by youknowdot · Pull Request #9809 · RustPython/RustPython

Description: Summary Add real TCP/UDP socket operations for wasm32-wasip1 through an opt-in wasix feature, tested with Wasmer 7.5.0. Connect socket construction, bind/listen/accept/connect, send/receive, forward DNS and endpoint names to the WASIX host ABI. Support blocking, nonblocking and timeout operations with polling, byte-buffer I/O, makefile, sendfile, duplication and descriptor ownership. Fix the WebAssembly constructor's positional/keyword arguments. Remove fabricated fd 0, successful no-op socket options and invented addresses. Keep portable preview1 builds free of WASIX imports. Unsupported hosts reject socket construction with ENOTSUP. Add loopback and denied-capability tests to the WASI CI job. Native Unix/Windows socket implementation and hot paths are unchanged. Validation Current head 942a0d65d1 passed hosted CI, including Linux/macOS/Windows snippets, Rust tests, Clippy, Miri, WASI and cross-target checks. All 26 reported checks succeeded; the optional base/head/CPython comparison was skipped. The WASI job actually built the opt-in backend and passed all 22 WASIX socket tests, denied-networking checks and the portable preview1 unsupported-capability check. A November 17 merge check against main a7a8fab002 is conflict-free. No source changes or repeated CI run were needed for that check. Earlier local validation records: Wasmer guest integration at 703423b4d2: 22 tests passed, including IPv4/IPv6 TCP, UDP, DNS, timeouts, partial reads, file-like I/O, an actual HTTPServer request/response, and descriptor lifetime/error cases. Networking disabled: real ENOTSUP, no fabricated success. Portable preview1 without the feature: explicit unsupported socket construction passed. Host ABI layout/unit tests: 3 passed under Wasmer; additional probes covered explicit protocols, socket options and raw descriptor ownership. WASI Clippy at 703423b4d2, with and without wasix: passed with no warnings in changed code; existing unrelated WASI warnings remain. Pre-commit hooks and actionlint passed. Zizmor has no new findings; the same four low-severity findings exist on main, and the medium-or-higher scan passes. Native workspace tests and doctests: 1,542 passed, 20 ignored, 0 failed. Separate C API tests: 149 passed, 2 ignored, 0 failed. Native workspace and separate C API strict Clippy (--all-targets -- -D warnings): passed. Native release at 564694cf31: 58 selected socket regressions ran: 56 passed and 2 existing skips, covering TCP/UDP, socket pairs, nonblocking I/O, file objects, timeouts, buffers and server helpers. Native loopback timing sanity check: 2,000 bidirectional 32-byte round trips, 7 samples, median 10.13 ms. No exact-main optimized binary was available, so this is not a controlled performance-regression comparison. The unchanged stdlib_socket snippet under WASIX stops at its assumption that one recv() returns an entire sent file. WASIX can return a valid short read. The new integration test checks the complete 32 KiB transfer with a receive loop; no existing assertion or skip was changed. Native full-suite limits were also recorded rather than hidden: -m test test_socket aborts in dns-lookup 4.0.2 while decoding a localized error (test_getaddrinfo_localized_error, UTF-8 unwrap, exit 101). The native stdlib_socket snippet reaches its NETLINK case and fails with host EPERM. Both outcomes reproduce with the previously built 38d813fba3 interpreter using this branch's same Lib. Native socket implementation files are unchanged by this PR. The 703423b4d2 follow-up changes only the WASM socket module, WASIX integration test and documentation; native gates above ran at 564694cf31. Host requirements and limits WASIX extensions are not standard WASI preview1. The feature needs a host providing wasix_32v1 and networking permission, such as Wasmer's --net. It is opt-in so ordinary preview1 artifacts remain portable. This does not add Unix/raw sockets, ancillary messages, multicast configuration, reverse DNS, system hostname/service lookup, IPv6 scope IDs or TLS. Unsupported flags/options fail explicitly. Wasmer cannot identify the type of rewrapped TCP listeners or bound UDP sockets; these require explicit constructor metadata, and SO_TYPE reports ENOTSUP if the host cannot establish the actual type. Build/run instructions and capability details: wasm/WASIX.md. AI assistance: OpenAI Codex implemented the backend, tests and documentation and ran the listed validation. The runtime did not expose its model version.

Open Graph Description: Summary Add real TCP/UDP socket operations for wasm32-wasip1 through an opt-in wasix feature, tested with Wasmer 7.5.0. Connect socket construction, bind/listen/accept/connect, send/receive, forwa...

X Description: Summary Add real TCP/UDP socket operations for wasm32-wasip1 through an opt-in wasix feature, tested with Wasmer 7.5.0. Connect socket construction, bind/listen/accept/connect, send/receive, forwa...

Opengraph URL: https://github.com/RustPython/RustPython/pull/9809

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:c31bf435-3cda-a24a-8425-ce78aaa71a95
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB4B8:3D97C8:2E6768C:3DCA05D:6B01D7EA
html-safe-noncea5e135f565e61fd341bcfeadc5796d1c883ef10f2d6b260abdc292b2819ff133
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNEI4OjNEOTdDODoyRTY3NjhDOjNEQ0EwNUQ6NkIwMUQ3RUEiLCJ2aXNpdG9yX2lkIjoiMzI0NDQ4MTQ1MDM5MjgwMzMwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac16b6dee596853b6bd42952fa19f49a7394489159c93b6053290dba1838644213
hovercard-subject-tagpull_request:5263652291
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/9809/files
twitter:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
og:image:altSummary Add real TCP/UDP socket operations for wasm32-wasip1 through an opt-in wasix feature, tested with Wasmer 7.5.0. Connect socket construction, bind/listen/accept/connect, send/receive, forwa...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git
octolytics-dimension-user_id39710557
octolytics-dimension-user_loginRustPython
octolytics-dimension-repository_id135201145
octolytics-dimension-repository_nwoRustPython/RustPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id135201145
octolytics-dimension-repository_network_root_nwoRustPython/RustPython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/9809/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9809%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9809%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=RustPython%2FRustPython
Reloadhttps://github.com/RustPython/RustPython/pull/9809/files
Reloadhttps://github.com/RustPython/RustPython/pull/9809/files
Reloadhttps://github.com/RustPython/RustPython/pull/9809/files
RustPythonhttps://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Codehttps://github.com/RustPython/RustPython
Issues195 (195)https://github.com/RustPython/RustPython/issues
Pull requests132 (132)https://github.com/RustPython/RustPython/pulls
Discussionshttps://github.com/RustPython/RustPython/discussions
Actionshttps://github.com/RustPython/RustPython/actions
Projectshttps://github.com/RustPython/RustPython/projects
Wikihttps://github.com/RustPython/RustPython/wiki
Security and qualityhttps://github.com/RustPython/RustPython/security
Insightshttps://github.com/RustPython/RustPython/insights
Sign up for GitHub https://github.com/signup?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
youknowdothttps://github.com/youknowdot
RustPython:mainhttps://github.com/RustPython/RustPython/tree/main
youknowdot:feat/wasi-sockets-20261112https://github.com/youknowdot/RustPython/tree/feat/wasi-sockets-20261112
Conversation 2 https://github.com/RustPython/RustPython/pull/9809
Commits 6 https://github.com/RustPython/RustPython/pull/9809/commits
Checks 27 https://github.com/RustPython/RustPython/pull/9809/checks
Files changed https://github.com/RustPython/RustPython/pull/9809/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9809/files
Add opt-in WASIX TCP and UDP socket support https://github.com/RustPython/RustPython/pull/9809/files#top
Show all changes 6 commits https://github.com/RustPython/RustPython/pull/9809/files
9b7a435 Add opt-in WASIX TCP and UDP socket support youknowdot Nov 11, 2026 https://github.com/RustPython/RustPython/pull/9809/commits/9b7a4355f61b67c41e009a9521ec93e4fc154f57
ae2f8cf Release mutable send-buffer locks before WASIX waits youknowdot Nov 11, 2026 https://github.com/RustPython/RustPython/pull/9809/commits/ae2f8cfb30cc17cc22eaad171e717f1a7969a497
c785846 Enforce one deadline across WASIX sendall retries youknowdot Nov 11, 2026 https://github.com/RustPython/RustPython/pull/9809/commits/c78584690ff0f67e4fe03a0d08ee2a69fc82695b
73823c1 Keep the backpressure assertion independent of scheduling youknowdot Nov 11, 2026 https://github.com/RustPython/RustPython/pull/9809/commits/73823c10edee5c2e7b2c962e22f80b33d96259e4
1f0df6b Preserve reverse-lookup fallback for WASIX HTTP servers youknowdot Nov 11, 2026 https://github.com/RustPython/RustPython/pull/9809/commits/1f0df6b2e1827d05750268b7e8f57401733138c9
942a0d6 Match WASM socket descriptor function signatures youknowdot Nov 11, 2026 https://github.com/RustPython/RustPython/pull/9809/commits/942a0d65d1d6c51e6cbbac7f86a45f4af31c784e
Clear filters https://github.com/RustPython/RustPython/pull/9809/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9809/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9809/files
ci.yaml https://github.com/RustPython/RustPython/pull/9809/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133dd
Cargo.toml https://github.com/RustPython/RustPython/pull/9809/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
Cargo.toml https://github.com/RustPython/RustPython/pull/9809/files#diff-e4412732c72406dfd2c3158e46bd5886285711715534b15ae910e1aec622ae4f
unsupported.rs https://github.com/RustPython/RustPython/pull/9809/files#diff-83b886733a9fa5df3c64734770c4a0fdd7323f49e9211e24a5df3f6d6f9857c0
wasix.rs https://github.com/RustPython/RustPython/pull/9809/files#diff-ac9db7c98ac762626326149df959431b6958d6a5348b89d7b65d10367db12db6
socket_wasm.rs https://github.com/RustPython/RustPython/pull/9809/files#diff-9ecefaf01dc84a6b356a53c0aca6591f6b439827b0e2850f3bb5375b0e3bf696
Cargo.toml https://github.com/RustPython/RustPython/pull/9809/files#diff-206ca536c8a0e972ae8dd6a3c7f1b87f2cf39bc248bc1ea0735ef140ab4b290c
socket_wasm.rs https://github.com/RustPython/RustPython/pull/9809/files#diff-578a1455f0cf3646995c72db04d9f7b74abc76fd6a06f8652eda59c4b35bc05b
wasix_socket.py https://github.com/RustPython/RustPython/pull/9809/files#diff-f57efd9d33554ac06b30b8380c2b3032b5fff7e7b759531216090585717c87f3
WASIX.md https://github.com/RustPython/RustPython/pull/9809/files#diff-672ec8f8740cd9e0645f0832eec374004299fc2ead783931358de2997b589735
.github/workflows/ci.yamlhttps://github.com/RustPython/RustPython/pull/9809/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133dd
View file https://github.com/RustPython/RustPython/blob/942a0d65d1d6c51e6cbbac7f86a45f4af31c784e/.github/workflows/ci.yaml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9809/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9809/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133dd
https://github.com/RustPython/RustPython/pull/9809/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133dd
https://github.com/RustPython/RustPython/pull/9809/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133dd
https://github.com/RustPython/RustPython/pull/9809/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133dd
Cargo.tomlhttps://github.com/RustPython/RustPython/pull/9809/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
View file https://github.com/RustPython/RustPython/blob/942a0d65d1d6c51e6cbbac7f86a45f4af31c784e/Cargo.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9809/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9809/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
https://github.com/RustPython/RustPython/pull/9809/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
crates/host_env/Cargo.tomlhttps://github.com/RustPython/RustPython/pull/9809/files#diff-e4412732c72406dfd2c3158e46bd5886285711715534b15ae910e1aec622ae4f
View file https://github.com/RustPython/RustPython/blob/942a0d65d1d6c51e6cbbac7f86a45f4af31c784e/crates/host_env/Cargo.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9809/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9809/files#diff-e4412732c72406dfd2c3158e46bd5886285711715534b15ae910e1aec622ae4f
https://github.com/RustPython/RustPython/pull/9809/files#diff-e4412732c72406dfd2c3158e46bd5886285711715534b15ae910e1aec622ae4f
crates/host_env/src/socket/unsupported.rshttps://github.com/RustPython/RustPython/pull/9809/files#diff-83b886733a9fa5df3c64734770c4a0fdd7323f49e9211e24a5df3f6d6f9857c0
View file https://github.com/RustPython/RustPython/blob/942a0d65d1d6c51e6cbbac7f86a45f4af31c784e/crates/host_env/src/socket/unsupported.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9809/{{ revealButtonHref }}
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9809/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9809/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.