XAMPPRocky
Yes writing the definitions by hand can time consuming and error-prone, but I designed the library in mind around the declarative API to make it easy to both manually write and generate, I also personally prefer writing Rust whenever possible, so nowadays I would sooner write an ASN.1 module in Rust and then if needed build a generator for the ASN.1 textual representation than write ASN.1 directly since I get access to much better and stronger tooling.
Also in my research when designing the crate, there are often requests in other ASN.1 or X.509 libraries to allow decoding semantically invalid messages because in the wild there are often services sending incorrect data, and so I designed rasn to allow you mix and match and easily build your own ASN.1 types from definitions so that when you do need something bespoke, it's easy and safe.
They did write about compile-time reflection, their talk was part of the conference[1], and now they’re not doing the talk. That’s enough to me take what they say at face value, especially now that in the wake of this there have been resignations in the leadership.
[1]: https://web.archive.org/web/20230523045330/https://rustconf....
> Attempting to shame people, without explaining what exactly happened, suggests a hissy fit.
Feels like self-projecting given how much you’re commenting in multiple threads to say “it’s not a big deal”, I don’t think someone who thinks it’s not a big deal would comment and try to argue so much if they actually thought it was.
The project leadership has continuously failed in these areas, and there has only been an effort to improve those things when they’ve been publicly called out. Without people openly communicating leadership failures, problems have often been ignored and maligned.
I don't know of any third-party projects that are using it, though from talking to users and looking at the download numbers there are quite a few, they're just closed-source. You can look at the dependent downloads[0] to get an idea of whose using the implementations included with rasn.
> How easy is it to use as a codec layer from other programming languages?
It's as easy as using any Rust code from other programming languages. Rasn is completely IO-agnostic, it works entirely using byte slices (`&[u8]`). So all that should be required is writing a C-friendly layer if doing this by hand, or using a language specific binding library like PyO3 to generate more friendly bindings.
This is a shameless plug, and not a compiler per se, but it's pretty close[0]. It's a codec framework for ASN.1 in Rust similar to `serde` for other formats if you're aware of that. It uses Rust's traits to define seperate layers for the codec model, and the encoding rules, allowing you to have one model used with many encodings, and share one decoder & encoder for all models. Extensibility just uses the regular Rust `#[non_exhaustive]` attribute. It doesn't support formats like A/UPER yet, but that is coming in the next year. :)
This is wrong. ASN.1 has always had support for "extensibility" out of the box. See section 52 of X.680[0] for complete details but I've included a couple of examples below. Also ASN.1 unlike other IDLs allows encodings to optionally take advantage of whether a type is considered in extensible. For example in PER, a type is a smaller encoding when it is not extensible.
A ::= INTEGER (0..10, ..., 12) -- A is 0 to 10, or 12.
-- V1 of B contains `a, b`, V2 contains `a, b, c`
B ::= SEQUENCE {
a INTEGER,
b BOOLEAN,
...
c OCTET STRING,
}
[0]: https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-X.68...The issue is that, there is no process to do that within the Rust-lang organisation. The core team is only accountable to themselves at this point.