Skip to content

Fix WASI build#17

Closed
alex-semenyuk wants to merge 2 commits intoRust-for-CPython:3.15-rust-in-cpythonfrom
MyHoneyBadger:wasm32_fix
Closed

Fix WASI build#17
alex-semenyuk wants to merge 2 commits intoRust-for-CPython:3.15-rust-in-cpythonfrom
MyHoneyBadger:wasm32_fix

Conversation

@alex-semenyuk
Copy link

No description provided.

@emmatyping
Copy link

  --- stderr
  /usr/include/features-time64.h:20:10: fatal error: 'bits/wordsize.h' file not found

  thread 'main' (22339) panicked at Modules/cpython-sys/build.rs:61:10:
  Unable to generate bindings: ClangDiagnostic("/usr/include/features-time64.h:20:10: fatal error: 'bits/wordsize.h' file not found\n")
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
make: *** [Makefile:3501: cpython-sys] Error 101

Looks like the system headers are not found correctly by bindgen, I wonder if we need to find wasi-libc/wasi-sdk ourselves. Ideally we'd make sure it's the same as the one found in https://github.com/python/cpython/blob/main/Tools/wasm/wasi/__main__.py, perhaps that script can pass an environment variable the build.rs can read?

@alex-semenyuk alex-semenyuk force-pushed the wasm32_fix branch 6 times, most recently from c98910d to a40e083 Compare January 4, 2026 10:33
@emmatyping
Copy link

Thanks for working on this! This was superseded by #24, which fixes WASI support, so I'm going to close this.

@emmatyping emmatyping closed this Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants