Re: [Cbor] CDDL Codegen in production

Carsten Bormann <> Fri, 04 September 2020 09:05 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 3E5B43A0D9B for <>; Fri, 4 Sep 2020 02:05:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id x3pgrXOXag8w for <>; Fri, 4 Sep 2020 02:05:14 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id F14743A0BCA for <>; Fri, 4 Sep 2020 02:05:13 -0700 (PDT)
Received: from [] ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPSA id 4BjWwS0w9Xz102v; Fri, 4 Sep 2020 11:05:12 +0200 (CEST)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.\))
From: Carsten Bormann <>
In-Reply-To: <>
Date: Fri, 4 Sep 2020 11:05:11 +0200
Cc:, Nicolas Arqueros <>,
X-Mao-Original-Outgoing-Id: 620903111.6868531-ba346e702bbeb2348c2858eca83d5c81
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <>
To: Sebastien Guillemot <>
X-Mailer: Apple Mail (2.3608.
Archived-At: <>
Subject: Re: [Cbor] CDDL Codegen in production
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 04 Sep 2020 09:05:17 -0000

Hi Sebastien,

this is very encouraging news!

Yes, I’m very curious.  We are seeing a lot of pickup of CBOR in the Fintech space, and it is nice to see that CDDL is being embraced, too.

I see that you have open-sourced the code generator at (with MIT License).
I’m impressed to see that you achieved all that in ~2700 lines of code.

> There are still rough edges to our codegen library because some features of CDDL don't work well with codegen (hopefully CDDL can improve this going forward!), 

We are certainly interested in hearing what CDDL features are troublesome to implement in a code generator.  The github repo lists a number of features that are not implemented, but doesn’t say whether you just didn’t need them or they are simply too much work.

Some of these features could be addressed by CDDL-to-CDDL preprocessors.
E.g., maybe one of the functions I could add to the cddlc tool is a Generics resolver, as well as a topological rule sorter (which might then also do the necessary work for sockets).

Grüße, Carsten