* Thread support is stubbed and any attempt to create a new thread fails.
*/
#if (!defined(HAVE_PTHREAD_STUBS) && \
+ !defined(__wasi__) && \
(!defined(__EMSCRIPTEN__) || defined(__EMSCRIPTEN_PTHREADS__)))
# define Py_CAN_START_THREADS 1
#endif
self.assertEqual(len(info), 3)
self.assertIn(info.name, ('nt', 'pthread', 'pthread-stubs', 'solaris', None))
self.assertIn(info.lock, ('pymutex', None))
- if sys.platform.startswith(("linux", "android", "freebsd")):
+ if sys.platform.startswith(("linux", "android", "freebsd", "wasi")):
self.assertEqual(info.name, "pthread")
elif sys.platform == "win32":
self.assertEqual(info.name, "nt")
elif sys.platform == "emscripten":
self.assertIn(info.name, {"pthread", "pthread-stubs"})
- elif sys.platform == "wasi":
- self.assertEqual(info.name, "pthread-stubs")
def test_abi_info(self):
info = sys.abi_info
b"# Required to statically build extension modules."
)
-WASI_SDK_VERSION = 25
+WASI_SDK_VERSION = 29
WASMTIME_VAR_NAME = "WASMTIME"
WASMTIME_HOST_RUNNER_VAR = f"{{{WASMTIME_VAR_NAME}}}"
f"{WASMTIME_HOST_RUNNER_VAR} run "
# Make sure the stack size will work for a pydebug
# build.
- # Use 16 MiB stack.
- "--wasm max-wasm-stack=16777216 "
+ # Use 32 MiB stack.
+ "--wasm max-wasm-stack=33554432 "
# Enable thread support; causes use of preview1.
# "--wasm threads=y --wasi threads=y "
# Map the checkout to / to load the stdlib from /Lib.