From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Alex Gaynor" <alex.gaynor@gmail.com>
Cc: "Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>,
<rust-for-linux@vger.kernel.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>
Subject: Re: ASN.1
Date: Wed, 22 May 2024 15:56:39 +0300 [thread overview]
Message-ID: <D1G6UP4N7LP4.OUPA5JVLE1WO@kernel.org> (raw)
In-Reply-To: <CAFRnB2Vxez-i7Trxe-5ErAWGszVRt6MSvN7Ed-XOcSLVp8piRQ@mail.gmail.com>
On Wed May 22, 2024 at 3:04 PM EEST, Alex Gaynor wrote:
> Hi Jarkko,
>
> I'm one of the maintainers of https://crates.io/crates/asn1/. Based on
> that experience, if you want to implement a DER encoder in Rust, I
> think it'd make more sense to write the type-code in Rust, and then
> expose symbols to C like `encode_rsa_pub_key`. This should be simpler,
> but also more efficient (fewer allocations).
>
> For what it's worth, rust-asn1 is _intended_ to be usable from the
> kernel/embedded targets. It's no_std. It currently relies on alloc,
> but I'd be happy to accept PRs to make it work with the kernel's
> approach to fallible allocation (it currently does support fallible
> allocation, but using the reserve APIs).
>
> Alex
Right, I need to experiment with that just in user space first.
It seemed like most "productized" crate from all that I found.
Yeah, and it is true that also crate could be as rusty as hell,
and then just make bridge shim that hides all that ;-) That is
probably better way around.
Thanks for the response!
BR, Jarkko
next prev parent reply other threads:[~2024-05-22 12:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-21 6:36 ASN.1 Jarkko Sakkinen
2024-05-21 14:52 ` ASN.1 Miguel Ojeda
2024-05-21 15:20 ` ASN.1 Jarkko Sakkinen
2024-05-21 18:01 ` ASN.1 Jarkko Sakkinen
2024-05-21 18:55 ` ASN.1 Jarkko Sakkinen
2024-05-22 12:04 ` ASN.1 Alex Gaynor
2024-05-22 12:56 ` Jarkko Sakkinen [this message]
2024-05-22 13:49 ` ASN.1 Jarkko Sakkinen
2024-05-23 7:00 ` ASN.1 Jarkko Sakkinen
2024-05-23 7:03 ` ASN.1 Jarkko Sakkinen
2024-05-23 15:44 ` ASN.1 Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D1G6UP4N7LP4.OUPA5JVLE1WO@kernel.org \
--to=jarkko@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=daniel.almeida@collabora.com \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=rust-for-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox