可以将.asn文件编译成Golang代码吗?

huangapple go评论85阅读模式
英文:

Is it possible to compile compile .asn files to Golang code?

问题

有没有一种适当的方法将 .asn 文件规范编译成 Golang 代码?我已经用 C 和 Rust 实现了,但是找不到适用于 Golang 的方法(尽管 Golang 标准库支持 ASN.1 规范的子集)。

英文:

Is there a proper way to compile a .asn file spec to Golang code ? I made it with C and Rust, but can't find anything for Golang (while it also supports a subset of ASN.1 spec in the standard library).

答案1

得分: 1

我认为你的意思是:是否有一种工具可以根据ASN.1规范生成Golang代码?

在谷歌搜索中只显示了一个:https://www.obj-sys.com/products/asn1c/index.php

encoding/asn1 go包只适用于非常特定的用途,并不能帮助你(除非你决定编写自己的编译器并在运行时使用encoding/asn1)。

英文:

I think you mean: is there a tool that generates Golang code from ASN.1 specs ?

A Google search only shows one: https://www.obj-sys.com/products/asn1c/index.php

The encoding/asn1 go package is for very specific uses and will not help you (unless you decide to write your own compiler and use encoding/asn1 at runtime)

huangapple
  • 本文由 发表于 2022年9月19日 21:05:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/73773813.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定