From: "Jörg Rödel" <joro@8bytes.org>
To: John Allen <john.allen@amd.com>
Cc: svsm-devel@coconut-svsm.dev
Subject: Re: [svsm-devel] Using crates in SVSM kernel
Date: Tue, 8 Apr 2025 11:20:42 +0200 [thread overview]
Message-ID: <Z_TqaiYE-eQbrzAn@8bytes.org> (raw)
In-Reply-To: <Z/Qrq8iBBt4Dgz6J@AUSJOHALLEN.amd.com>
Hey John,
On Mon, Apr 07, 2025 at 02:46:51PM -0500, John Allen wrote:
> I am new to the project and embedded rust in general. I'm working with
> Pankaj G. on SVSM support for SNP live migration and I'm starting to
> sketch out some code for key exchange, but I'm learning that many crates
> available in non-embedded rust depend on std or on OS abstractions. For
> example, I want to generate a ecdsa p384 key using the p384 crate, but
> this depends on "get_random" which relies on a whitelist of supported
> targets to determine the rng method. This is just one of several crates
> that I would have liked to use, but depend on std or are incompatible
> with the "x86_64-unknown-none" target.
>
> What is best practice when it comes to including libraries like this?
> What options do we have here other than reimplementing functionality
> from these crates or is reimplementation the expected course of action
> in this environment?
You are right that currently there is not support for the Rust standard
library in the COCONUT environment. This comes from the nature of the
project which is more on an OS kernel level than a binary for an
ordinary target.
There is currently work underway to enable support for the Rust standard
library for user-mode binaries running on the COCONUT platform, but that
is not ready for use yet.
So the options are to either wait for this support to materialize or (as
Stefano pointed out) use Rust libraries which support a no_std
environment.
Regards,
Joerg
prev parent reply other threads:[~2025-04-08 9:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 19:46 [svsm-devel] Using crates in SVSM kernel John Allen
2025-04-08 8:54 ` Stefano Garzarella
2025-04-08 9:20 ` Jörg Rödel [this message]
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=Z_TqaiYE-eQbrzAn@8bytes.org \
--to=joro@8bytes.org \
--cc=john.allen@amd.com \
--cc=svsm-devel@coconut-svsm.dev \
/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