rasn icon indicating copy to clipboard operation
rasn copied to clipboard

ASN.1 Compiler Tracking Issue

Open DemiMarie opened this issue 2 years ago • 6 comments

This is a non-trivial amount of work and I would not at all mind if it was declared out-of-scope, but it would be nice for rasn to be a full-fledged ASN.1 compiler. Some protocol definitions (cough 3GPP) are huge and writing models by hand would be very error-prone.

DemiMarie avatar Jan 26 '22 23:01 DemiMarie

Thank you for your issue! I don't want to say it's forever off the table, because the goal of the project is world domination for ASN.1, and having a compiler would make it a lot easier to use and adopt in projects. However it will probably not be a couple of years at least at the current rate. My current focus is on PER as the project has a grant to implement those encoding rules.

This project originally started as a compiler for ASN.1 schema, so I do have already have a basic parser and code generator somewhere, but it probably needs a lot of clean up as it was made several design iterations ago. If people are interested in working on this, I could try and pull it back in as a publish = false crate to let people work on it till its at a state that we're comfortable releasing.

XAMPPRocky avatar Jan 27 '22 10:01 XAMPPRocky

Hello @XAMPPRocky, I recently found your project and I really loved it. I tried a dozen of other ASN1 libraries before this and they were all broken by design.

For a long time I tried to fix asn1rs but it is far from done. One of the advantages of that library over yours is its generator.

I'd love to help with that if you are OK with that. We can continue as you said with a publish = false crate, so I can complete it in my free it. It should not be a hard thing to do.

Let me know if you are OK with that.

masihyeganeh avatar Apr 08 '22 20:04 masihyeganeh

@masihyeganeh Thank you for your interest! I'll try to find it and clean it up. I'll also make some issues for tracking progress for individual aspects.

XAMPPRocky avatar Apr 09 '22 07:04 XAMPPRocky

@masihyeganeh The code is now available under compiler.

XAMPPRocky avatar Apr 09 '22 13:04 XAMPPRocky

Great. Let me take a look at it

masihyeganeh avatar Apr 09 '22 14:04 masihyeganeh

Ok, I changed the code a but and here is the result: #92 I'm not 100% happy with what I changed but at least it can be a concrete implementation so we can work on it and change it so we both are happy with it.

@XAMPPRocky Let me know what you think about it.

I may add some Github comments on some lines to show why I chose that particular way.

masihyeganeh avatar Apr 12 '22 10:04 masihyeganeh

There is now a compiler available as a separate repo

XAMPPRocky avatar Feb 12 '24 23:02 XAMPPRocky