diff --git a/Sources/Testing/Support/Versions.swift b/Sources/Testing/Support/Versions.swift index b671b302b..85d55429d 100644 --- a/Sources/Testing/Support/Versions.swift +++ b/Sources/Testing/Support/Versions.swift @@ -89,9 +89,8 @@ let operatingSystemVersion: String = { } } #elseif os(WASI) - if let version = swt_getWASIVersion().flatMap(String.init(validatingCString:)) { - return version - } + // WASI does not have an API to get the current WASI or Wasm version. + // wasi-libc does have uname(3), but it's stubbed out. #else #warning("Platform-specific implementation missing: OS version unavailable") #endif diff --git a/Sources/_TestingInternals/include/Versions.h b/Sources/_TestingInternals/include/Versions.h index b188a4d66..65fc4170e 100644 --- a/Sources/_TestingInternals/include/Versions.h +++ b/Sources/_TestingInternals/include/Versions.h @@ -53,24 +53,6 @@ SWT_EXTERN void swt_getTestingLibraryCommit(const char *_Nullable *_Nonnull outH /// testing library, or `nullptr` if that information is not available. SWT_EXTERN const char *_Nullable swt_getTargetTriple(void); -#if defined(__wasi__) -/// Get the version of the C standard library and runtime used by WASI, if -/// available. -/// -/// This function is provided because `WASI_SDK_VERSION` may or may not be -/// defined and may or may not be a complex macro. -/// -/// For more information about the `WASI_SDK_VERSION` macro, see -/// [wasi-libc-#490](https://github.com/WebAssembly/wasi-libc/issues/490). -static const char *_Nullable swt_getWASIVersion(void) { -#if defined(WASI_SDK_VERSION) - return WASI_SDK_VERSION; -#else - return 0; -#endif -} -#endif - SWT_ASSUME_NONNULL_END #endif