asn1_compiler

Latest version: 0.1.1 registry icon
Maintenance score
0
Safety score
0
Popularity score
71
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High
0.1.1 0 0 0 0
0.1.0 0 0 0 0

Stability
Latest release:

0.1.1 - this version is safe to use because it has no known security vulnerabilities at this time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

MIT   -   MIT License

Not a wildcard

Not proprietary

OSI Compliant



Asn1Compiler

A mix compiler for the ASN.1 format leveraging Erlang's :asn1_ct.

Installation

The package can be installed by adding asn1_compiler to your list of dependencies in mix.exs:

def deps do
  [
    {:asn1_compiler, "~> 0.1.0", runtime: false}
  ]
end

Please notice the runtime: false option - the compiler is not needed at runtime and should not be included in releases.

Usage

Once installed, the compiler can be enabled by changing project configuration in mix.exs:

def project() do
  [
    # ...
    compilers: [:asn1] ++ Mix.compilers(),
    asn1_options: [:maps]
  ]
end

Then, you can place your .asn1 files in the asn1 folder. The files will be compiled to src as Erlang modules that will be picked up by the Erlang compiler.

The :asn1_ct compiler accepts many options that are described in the documentation - they can be passed using the asn1_options project configuration (in the same place where the compilers configuration lives). It is recommended to at least set the options to [:maps] so that the decoding and encoding passes use maps rather than records.

Further documentation can found at https://hexdocs.pm/asn1_compiler.