Skip to content

Commit ea9ac1c

Browse files
committed
Expose the error to the os(WASI) build.
This should let `AsyncMessageSequency.swift` build.
1 parent 0e70157 commit ea9ac1c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/SwiftProtobuf/BinaryDelimited.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#if !os(WASI)
1616
import Foundation
17+
#endif
1718

1819
/// Helper methods for reading/writing messages with a length prefix.
1920
public enum BinaryDelimited {
@@ -47,6 +48,7 @@ public enum BinaryDelimited {
4748
case noBytesAvailable
4849
}
4950

51+
#if !os(WASI)
5052
/// Serialize a single size-delimited message to the given stream. Delimited
5153
/// format allows a single file or stream to contain multiple messages,
5254
/// whereas normally writing multiple non-delimited messages to the same
@@ -222,8 +224,10 @@ public enum BinaryDelimited {
222224
partial: partial,
223225
options: options)
224226
}
227+
#endif // !os(WASI)
225228
}
226229

230+
#if !os(WASI)
227231
// TODO: This should go away when encoding/decoding are more stream based
228232
// as that should provide a more direct way to do this. This is basically
229233
// a rewrite of BinaryDecoder.decodeVarint().
@@ -268,4 +272,4 @@ internal func decodeVarint(_ stream: InputStream) throws -> UInt64 {
268272
}
269273
}
270274
}
271-
#endif
275+
#endif // !os(WASI)

0 commit comments

Comments
 (0)