# swift **Repository Path**: mirrors_mariusae/swift ## Basic Information - **Project Name**: swift - **Description**: Swift is an easy-to-use, annotation-based Java library for creating Thrift serializable types and services. - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-10-27 - **Last Updated**: 2025-12-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Swift Swift is an easy-to-use, annotation-based Java library for creating Thrift serializable types and services. # Swift Codec [Swift Codec](swift-codec) is a simple library specifying how Java objects are converted to and from Thrift. This library is similar to JaxB (XML) and Jackson (JSON), but for Thrift. Swift codec supports field, method, constructor, and builder injection. For example: @ThriftStruct public class LogEntry { private final String category; private final String message; @ThriftConstructor public LogEntry(String category, String message) { this.category = category; this.message = message; } @ThriftField(1) public String getCategory() { return category; } @ThriftField(2) public String getMessage() { return message; } } # Swift Service [Swift Service](swift-service) is a simple library annotating services to be exported with Thrift. For example: @ThriftService("scribe") public class InMemoryScribe { private final List messages = new ArrayList<>(); public List getMessages() { return messages; } @ThriftMethod("Log") public ResultCode log(List messages) { this.messages.addAll(messages); return ResultCode.OK; } } # Swift Generator [Swift Generator](swift-generator) can create Java code usable with the Swift codec from Thrift IDL files. # Swift Maven plugin [Swift Maven plugin](swift-maven-plugin) allows using the code generator from a maven build and generate source code on the fly.