SSWG-0033: Swift ASN.1

The review of SSWG-0033: Swift ASN.1 begins now and runs for two weeks, until September 3rd, 2024.


Reviews are an important part of the Swift Server Work Group incubation process . All review feedback should be either on this forum thread or, if you would like to keep your feedback private, directly to the review manager (via email) or direct message in the Swift forums.

The package is being proposed at the Sandbox maturity level. Please note the Maturity Justification inside the proposal for details and indicate which you find more appropriate as part of your review.

What goes into a review of a proposal?

The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, become listed on the Swift Server Ecosystem index page .

When reviewing a proposal, here are some questions to consider:

  • What is your evaluation of the proposal and its APIs/implementation?
  • Is the problem being addressed relevant for the wider Swift on Server ecosystem?
  • Does this proposal fit well with the feel and direction of the Swift Server ecosystem?
  • If you have used other libraries in Swift or other languages, how do you feel that this proposal compares to those?
  • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

Tim Condon
Review Manager

6 Likes

This isn't going to change anything, but I did want to point out that a Codable-based implementation can work. See here, which also integrates with Heimdal's ASN.1 compiler. It does make quite heavy use of reflection which may not be ideal from a performance perspective.

This was implemented a couple of years ago so, were I doing it again today, I'd probably use macros.

Hi Luke! Yes, I was aware of ASN1Codable, which was part of why I rejected the Codable design: I wasn't aware of any better solution than the one you produced, and there was certainly no point in me re-building that!

I would absolutely love to see bindings for Heimdal's ASN.1 compiler in swift-asn1 though.

I'm a bit pushed for time at the moment but, shouldn't be to hard – there's some (admittedly not particularly pleasant) code in ASN1Codable to parse the JSON-encoded AST output from the Heimdal compiler, would just need to replace the code emitter.