Adds full supposed for Wasm in the swift lib (#7328)

Adds tests for wasm module & github action
This commit is contained in:
mustiikhalil
2022-05-29 20:56:33 +02:00
committed by GitHub
parent 9aa08a429e
commit 967df08b1d
26 changed files with 3092 additions and 12 deletions

View File

@@ -14,15 +14,21 @@
* limitations under the License.
*/
#if os(Linux)
import CoreFoundation
#if !os(WASI)
#if os(Linux)
import CoreFoundation
#else
import Foundation
#endif
#else
import Foundation
import SwiftOverlayShims
#endif
/// A boolean to see if the system is littleEndian
let isLitteEndian = CFByteOrderGetCurrent() ==
Int(CFByteOrderLittleEndian.rawValue)
let isLitteEndian: Bool = {
let number: UInt32 = 0x12345678
return number == number.littleEndian
}()
/// Constant for the file id length
let FileIdLength = 4
/// Type aliases