librasn / compiler

An ASN1 compiler producing Rust bindings for the rasn framework
Other
13 stars 7 forks source link

Hello! 👋 #11

Open 6d7a opened 6 months ago

6d7a commented 6 months ago

Hello! 👋

Thank you for wanting to contribute to rasn and its compiler. Currently, the main goal of the compiler development is to achieve full compliance with the specifications that define ASN.1.

If you don't already know how you may want to contribute to the compiler's development, check out the parses_modules test. The test runs the compiler against a collection of public ASN.1 modules and outputs a rudimentary log file (parse_test_results.txt) that is a good place to figure out where some work needs to be done.

A typical error might look like this in parse_text_result.txt:

...
----------------------------------------------------------------------------
"./tests/modules/itu-t_q_q1228_1997_IN-CS2-SCF-SCF-pkgs-contracts-acs.asn1"
----------------------------------------------------------------------------
ParserError {
    details: "Error matching ASN syntax while parsing:scf-scfContract CONTRACT ::= {\n  CONNECTION             scf-scfConnectionPackage...

The header deliminated by hyphens indicates the path to the module that caused the error when the compiler was trying to parse it. Below, the ParserError lets us know that the compiler was having trouble digesting a particular segment of the ASN.1 module: Something around the occurrence of scf-scfContract CONTRACT ::= {...

Any further investigation from this point on can only be of help. Already an issue with a minimal reproduction of the error is a great contribution.