# The Case for Writing Network Drivers in High-Level Programming Languages \[such as Haskell\]

**URL:** <https://discourse.haskell.org/t/the-case-for-writing-network-drivers-in-high-level-programming-languages-such-as-haskell/14550>\
**Category:** Links\
**Created:** [August 12, 2026, 10:38pm UTC](https://discourse.haskell.org/t/the-case-for-writing-network-drivers-in-high-level-programming-languages-such-as-haskell/14550 "2026-08-12T22:38:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregbm](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@gregbm](https://discourse.haskell.org/u/gregbm)\
**Post date:** [August 12, 2026, 10:38pm UTC](https://discourse.haskell.org/t/the-case-for-writing-network-drivers-in-high-level-programming-languages-such-as-haskell/14550/1 "2026-08-12T22:38:19Z")

</div>

At work, I came across this case study from 2019 about implementing network drivers in various high-level programming languages, including Haskell.

> **[The Case for Writing Network Drivers in High-Level Programming Languages](https://arxiv.org/abs/1909.06344)**
>
> Drivers are written in C or restricted subsets of C++ on all production-grade server, desktop, and mobile operating systems. They account for 66% of the code in Linux, but 39 out of 40 security bugs related to memory safety found in Linux in 2017 are...

The Haskell network driver implementation is here:

> **[GitHub - ixy-languages/ixy.hs](https://github.com/ixy-languages/ixy.hs)**
>
> Contribute to ixy-languages/ixy.hs development by creating an account on GitHub.

The Haskell implementation is not very performant (both in terms of latency and throughput), but it is small (both in terms of lines of code and source size) and doesn’t include any c code. Per the authors, Haskell also protects against major classes of bugs found in the original C driver: OOB in general memory, use-after-free in general memory, OOB in packet buffers, use-after-free in packet buffers, and int overflow.

I’m curious if there have been any developments since 2019 that would make Haskell better-suited for this use case. nonmoving gc is one, as it should reduce latency (which is very important for this application), but are there any others?

---

<div class="post-metadata">

**Author:** ![jaror](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jaror/32/3271_2.png) [@jaror](https://discourse.haskell.org/u/jaror)\
**Post date:** [August 12, 2026, 11:33pm UTC](https://discourse.haskell.org/t/the-case-for-writing-network-drivers-in-high-level-programming-languages-such-as-haskell/14550/2 "2026-08-12T23:33:54Z")

</div>

I remember wanting to try some possible improvements at the time, but it requires specific hardware to run, so I couldn’t try it myself.

Here is a link to some discussion I (/u/noughtmare) had with the author:

[https://old.reddit.com/r/haskell/comments/d355cg/comparisonbenchmark\_a\_highspeed\_network\_driver/f00l3ux/](https://old.reddit.com/r/haskell/comments/d355cg/comparisonbenchmark_a_highspeed_network_driver/f00l3ux/)

---

<div class="post-metadata">

**Author:** ![jackdk](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jackdk](https://discourse.haskell.org/u/jackdk)\
**Post date:** [August 13, 2026, 3:27am UTC](https://discourse.haskell.org/t/the-case-for-writing-network-drivers-in-high-level-programming-languages-such-as-haskell/14550/3 "2026-08-13T03:27:33Z")

</div>

I haven’t seen anything in this vein using Haskell specifically, and the obvious high-level language in this space is now Rust. But if you want to stay within the ML-family, perhaps [OxCaml](https://oxcaml.org/) might be worth a look?

---

<div class="post-metadata">

**Author:** ![Ambrose](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/ambrose/32/5672_2.png) [@Ambrose](https://discourse.haskell.org/u/Ambrose)\
**Post date:** [August 13, 2026, 4:25am UTC](https://discourse.haskell.org/t/the-case-for-writing-network-drivers-in-high-level-programming-languages-such-as-haskell/14550/4 "2026-08-13T04:25:12Z")

</div>

Linear Types are new since 2019 and I’d imagine they could help with some stuff. One example in the paper is even a socket API!
