mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
These APIs will be used for writing automation tools in Swift. Just like other private APIs, this module is not exposed to extrenal users. The primary motivation for doing instead of using NSCoder this is that NSCoder does not work with structs and Swift containers. Using classes for everything just to satisfy NSCoder forces unnatural code. This API requires two times (!) less boilerplate than NSCoding, since the same method is used for serialization and deserialization. This API is also more type-safe, it does not require the user to write 'as' type casts, unlike NSCoding. Please take a look at validation-test/stdlib/SwiftPrivateSerialization.swift to see the intended use pattern. The performance of the underlying implementation is already decent, and there's a lot of room for improvement. This is a re-commit of r25678, with a fix for 32-bit platforms. Swift SVN r25877
11 lines
341 B
CMake
11 lines
341 B
CMake
add_swift_library(swiftSwiftPrivateSerialization SHARED IS_STDLIB
|
|
# This file should be listed the first. Module name is inferred from the
|
|
# filename.
|
|
SwiftPrivateSerialization.swift.gyb
|
|
MsgPack.swift
|
|
MsgPackSerialization.swift.gyb
|
|
|
|
SWIFT_COMPILE_FLAGS -Xfrontend -sil-serialize-all
|
|
INSTALL_IN_COMPONENT stdlib-experimental)
|
|
|