# Creating a Compiler-Independent Socket Library

**URL:** https://forum.ada-lang.io/t/creating-a-compiler-independent-socket-library/4525
**Category:** Award Nominations
**Tags:** ada, gnat
**Created:** [June 28, 2026, 10:12am UTC](https://forum.ada-lang.io/t/creating-a-compiler-independent-socket-library/4525 "2026-06-28T10:12:55Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Irvise](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/i/7ba0ec/32.png) [@Irvise](https://forum.ada-lang.io/u/Irvise)
#### Post date: [June 28, 2026, 10:12am UTC](https://forum.ada-lang.io/t/creating-a-compiler-independent-socket-library/4525/1 "2026-06-28T10:12:55Z")

</div>

# Creating a Compiler-Independent Socket Library

The Ada Awards Committee has nominated for an award the task of creating a compiler-independent socket library named Sockets.

## Motivation

Portability is an important aspect of Ada. Currently there is only [GNAT.Sockets](https://github.com/gcc-mirror/gcc/blob/82bccaca92843f0a823d5490d5764de69c291e6e/gcc/ada/libgnat/g-socket.ads) and [AdaSockets](https://sr.ht/~rfc1149/adasockets/), both GNAT specific and both bindings. The goals of the Ada Awards would be furthered by a compiler-independent library (not a binding). Sockets should cover at a minimum the functionality of [GNAT.Sockets](https://github.com/gcc-mirror/gcc/blob/82bccaca92843f0a823d5490d5764de69c291e6e/gcc/ada/libgnat/g-socket.ads) and [GNAT.Sockets.Poll](https://github.com/gcc-mirror/gcc/blob/82bccaca92843f0a823d5490d5764de69c291e6e/gcc/ada/libgnat/g-socpol.ads).

## Goals

The final deliverables are the Sockets library, well documented in package specifications and any additional documentation needed, and a demonstration of its use in a modification of the [Ada-GUI](https://github.com/jrcarter/Ada_GUI) sample implementation that uses the library in place of GNAT.Sockets.

The library will conform to an existing, consistent, and well reasoned coding standard such as [the PragmAda Coding Standard](https://github.com/jrcarter/Coding_Standard). All Ada will be Ada 12 and demonstrated on multiple Ada-12 compilers (currently GNAT and ObjectAda).

### Milestones

#### _Part 1 (Award: 150 EUR)_

- The library
- The internal documentation
- Any external documentation

#### _Part 2 (Award: 150 EUR)_

- A version of the Ada-GUI sample implementation that uses the library
- Versions of the Show\_All test program created with multiple compilers

## Guidelines and further indications

The [general Ada Awards Guidelines](https://forum.ada-lang.io/t/ada-user-awards-guidelines/4519) apply to this proposal for those who want to participate. For open, technical discussions on this topic or project, feel free to open topics under the [Active Projects](https://forum.ada-lang.io/c/projects/active-projects/11) forum category.

Best regards,  
The Ada Awards Committee.

---

<div class="post-metadata">

### Author: ![tomekw](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/tomekw/32/883_2.png) [@tomekw](https://forum.ada-lang.io/u/tomekw)
#### Post date: [June 28, 2026, 9:01pm UTC](https://forum.ada-lang.io/t/creating-a-compiler-independent-socket-library/4525/2 "2026-06-28T21:01:19Z")

</div>

Just curious, does this mean an idiomatic Ada API doing its own interfacing to platform-specific C APIs, like I have done with [Padlock](https://github.com/tomekw/padlock)?

---

<div class="post-metadata">

### Author: ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)
#### Post date: [June 29, 2026, 8:02am UTC](https://forum.ada-lang.io/t/creating-a-compiler-independent-socket-library/4525/3 "2026-06-29T08:02:25Z")

</div>

Did you consider

- raw sockets (used in diagnostics, security, field real-time protocols, based on the data link layer like EtherCAT, etc)
- multicast sockets (used in streaming)

---

<div class="post-metadata">

### Author: ![tomekw](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/tomekw/32/883_2.png) [@tomekw](https://forum.ada-lang.io/u/tomekw)
#### Post date: [June 29, 2026, 11:44am UTC](https://forum.ada-lang.io/t/creating-a-compiler-independent-socket-library/4525/4 "2026-06-29T11:44:46Z")

</div>

> [@dmitry-kazakov](#):
>
> Did you consider

Me? I did ask whether the approach I took with Padlock is what is expected, not whether it’s a solution 🙂

---

<div class="post-metadata">

### Author: ![Qunying](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/q/f9ae1b/32.png) [@Qunying](https://forum.ada-lang.io/u/Qunying)
#### Post date: [July 20, 2026, 9:58pm UTC](https://forum.ada-lang.io/t/creating-a-compiler-independent-socket-library/4525/6 "2026-07-20T21:58:29Z")

</div>

There exist another socket library: [ANET](https://www.codelabs.ch/anet/) by codelabs.

---

<div class="post-metadata">

### Author: ![JC001](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/j/e56c9b/32.png) [@JC001](https://forum.ada-lang.io/u/JC001)
#### Post date: [July 21, 2026, 8:16am UTC](https://forum.ada-lang.io/t/creating-a-compiler-independent-socket-library/4525/7 "2026-07-21T08:16:33Z")

</div>

ANET: Thank you for pointing this out. Unfortunately, it is GNAT-specific.
