Moving data structures in SwiftNIO into separate repo?

There are several discussions in this forum about lacking data structures in Swift: Adding more data structures to the standard library, Data structures as functions? (Priority Queue) - #7 by rumnat

For me personally, it is the PriorityQueue, which I need to implement PrioritizedReplayBuffer in Swift.

I took a cursory look at SwiftNIO's PriorityQueue, Heap and CircularBuffer implementation, it seems to be struct based and generally conforms to Sequence protocol. Anything else you feel that can be improved before we move it into separate repo and somehow find interests within Swift Core team to have a blessed library for data structures based on these?


Yes, a swift-collections repo alongside swift-algorithms would be great. If they were suitable for NIO, even better.


If I remember correctly, NIO's types are very much tuned for NIOS's very specific use-case and not the most general implementations. It would be nice however to have them at least available in a separate nio-foundation or similar package, as they are pretty awesome in many regards. Who doesn't love ByteBuffer! :slight_smile:


I think this is a great idea and would definitely help reduce the compile times in some of my projects. I filed an issue on SwiftNIO's repository (linking to this thread) to bring some more attention to this, hopefully it happens!

1 Like
Terms of Service

Privacy Policy

Cookie Policy