Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Build wasm32-wasi without WASIX #95174

Closed
Closed
Labels
3.11only security fixes3.12only security fixesOS-wasitype-featureA feature request or enhancement
@tiran

Description

@tiran

Feature or enhancement

I propose to remove dependency on WASIX. Instead Python should omit missing features or provide stubs when a feature cannot be disabled.

wasm32-wasi builds are depending onWASIX. WASIX provides stubs for POSIX functions that are not part of currentWASI API, for example several socket functions and pthreads. The stubs are no-ops or return an error. WASIX was the simplest approach to boot strap WASI support.

Pitch

Removal of WASIX has several benefits for us:

  • It is one less dependency that must be downloaded, compiled, installed, and injected into the build environment with CFLAGS and LDFLAGS.
  • Missing features and functions are easier to detect. With WASIX an unsupported feature raises an exception at runtime. Without WASIX the function is not wrapped and missing features can be detected withhasattr().
  • Feature detection and stubs are useful for people that try to port Python to other operating systems with limited POSIX compatibility.

Missing features in WASI that need attention:

  • pthread API, these will be stubbed withstatic inline functions
  • netdb functionsgetservbyname getservbyport gethostbyname gethostaddr getprotobyname. They will be detected by configure.ac and handled with#ifdef HAVE_ checks.
  • socket functionsinet_ntoa inet_pton getpeername getsockname bind connect listen recvfrom sendto setsockopt socket. They will be handled like missing netdb functions.
  • some missing constants like POLLPRIO and ESHUTDOWN

WASI does not support DNS lookup and NSS. Sockets are limited to read/write/close from a socket FD or accept call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only security fixes3.12only security fixesOS-wasitype-featureA feature request or enhancement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp