Summary

Port Thrift support from ZIO Schema v1 to ZIO Schema 2 in a new top-level schema-thrift project.

Implementation includes:

  • ThriftBinaryCodec abstract class extending BinaryCodec[A]
  • ThriftFormat object with Deriver[ThriftBinaryCodec]
  • ChunkTransport for bridging Thrift transport with byte arrays/buffers
  • Support for all 30 primitive types (Unit, Boolean, Byte, Short, Int, Long, Float, Double, Char, String, BigInt, BigDecimal, all java.time types, Currency, UUID)
  • Record, variant, sequence, map, dynamic value, and wrapper support
  • Recursive type support via lazy initialization
  • Comprehensive test suite with 108 tests

Deriver Methods Implemented:

  • derivePrimitive - All primitive types
  • deriveRecord - Case classes encoded as Thrift structs
  • deriveVariant - Sealed traits encoded as Thrift unions
  • deriveSequence - Collections encoded as Thrift lists
  • deriveMap - Maps encoded as Thrift maps
  • deriveDynamic - DynamicValue support
  • deriveWrapper - Wrapper types with validation

Dependencies:

  • org.apache.thrift:libthrift:0.20.0
  • jakarta.annotation:jakarta.annotation-api:3.0.0

Test plan

  • All 108 tests pass
  • Format check passes
  • Compiles against latest main

/claim #681

Claim

Total prize pool $1,000
Total paid $0
Status Pending
Submitted January 15, 2026
Last updated January 15, 2026

Contributors

HA

hartmade

@hartmade

100%

Sponsors

ZI

ZIO

@ZIO

$1,000