Tech News
← Back to articles

I spent a year making an ASN.1 compiler in D

read original related products more articles

I spent a year of my life making an ASN.1 compiler in D

Published: 2025/10/23 | Updated: 2025/10/23

… and it’s still nowhere near complete.

In this post I’ll just rambling about ASN.1; parts of the compiler implementation, and some of the tool’s output rather than the tool itself as its still too WIP to really advertise on its own yet.

This post is unstructured, so you can just pick somewhere random and start reading from there with no/minimal context lost.

Note: the name of the tool is dasn1.

Summary

Motivation

I’m currently writing Juptune - a toy async I/O framework that attempts to implement as much of its stack as possible in pure D.

I’m really interested in writing an implementation of TLS, which means I need to be able to handle x.509 certificates (i.e. TLS/SSL certs), which means I need to be able to handle their underlying data encoding: ASN.1’s DER encoding.

... continue reading