We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 184eba3 commit afc0938Copy full SHA for afc0938
Sources/TSCUtility/Triple.swift
@@ -249,7 +249,7 @@ extension Triple {
249
case .windows:
250
return ".dll"
251
case .wasi:
252
- fatalError("WebAssembly/WASI doesn't support dynamic library yet")
+ return ".wasm"
253
}
254
255
Tests/TSCUtilityTests/TripleTests.swift
@@ -54,4 +54,12 @@ class TripleTests : XCTestCase {
54
let linuxWithGNUABI = try Triple("x86_64-unknown-linux-gnu")
55
XCTAssertNotEqual(linuxWithoutGNUABI, linuxWithGNUABI)
56
57
+
58
+ func testWASI() throws {
59
+ let wasi = try Triple("wasm32-unknown-wasi")
60
61
+ // WASI dynamic libraries are only experimental,
62
+ // but SwiftPM requires this property not to crash.
63
+ _ = wasi.dynamicLibraryExtension
64
+ }
65
0 commit comments