public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Hindborg <nmi@metaspace.dk>
To: TruongSinh Tran-Nguyen <i@truongsinh.pro>
Cc: Kent Overstreet <kent.overstreet@linux.dev>,
	linux-bcachefs@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] chore(util): minimal Rust build example
Date: Tue, 09 May 2023 22:52:48 +0200	[thread overview]
Message-ID: <87mt2dcje2.fsf@metaspace.dk> (raw)
In-Reply-To: <CAMy36z75N9obj0WM+OFhhnzXAPxqhg8PVY7_x8X6JbQABFnMQw@mail.gmail.com>


TruongSinh Tran-Nguyen <i@truongsinh.pro> writes:

> On Tue, 9 May 2023 at 10:47, Kent Overstreet <kent.overstreet@linux.dev> wrote:
>
>> We pretty heavily use to_text() functions kernel side; these output to
>> printbufs, and in Rust they map nicely to the Display trait - do we have
>> that available in the kernel or is that in std?
>>
>
> https://doc.rust-lang.org/std/fmt/trait.Display.html Display trait is definitely
> in Rust `std`. As for the alternative from kernel, I am still searching.
> Worst case, there is nothing right now, Rust-for-linux folks would
> happy to take PR
> to include it.

Many traits and types in `std` are reexports from `core` or `alloc`.
To my knowledge, there is no way to see if an item is reexported when
browsing the documentation. Some ways discover reexports when browsing docs:

 - hit the `source` link at see where it is going
 - when searching for an item, see if it is present in multiple crates.

Best regards
Andreas


  parent reply	other threads:[~2023-05-09 20:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03  6:53 [PATCH] chore(util): minimal Rust build example TruongSinh Tran-Nguyen
2023-05-09 17:47 ` Kent Overstreet
2023-05-09 17:57   ` TruongSinh Tran-Nguyen
2023-05-09 18:12     ` Kent Overstreet
2023-05-09 18:41       ` Wedson Almeida Filho
2023-05-09 20:57         ` TruongSinh Tran-Nguyen
2023-05-10  3:10           ` TruongSinh Tran-Nguyen
2023-05-10 17:59             ` Miguel Ojeda
2023-05-10 18:21               ` TruongSinh Tran-Nguyen
2023-05-11 23:37                 ` Miguel Ojeda
2023-05-11 23:54                   ` TruongSinh Tran-Nguyen
2023-05-12  0:02                     ` Miguel Ojeda
2023-05-12  3:31                     ` Kent Overstreet
2023-05-12  4:16                       ` TruongSinh Tran-Nguyen
2023-05-12  4:18                         ` Kent Overstreet
2023-05-12  4:39                           ` TruongSinh Tran-Nguyen
2023-05-12  5:33                             ` Kent Overstreet
2023-05-12 14:26                               ` TruongSinh Tran-Nguyen
2023-05-10 18:38               ` Kent Overstreet
2023-05-11 23:39                 ` Miguel Ojeda
2023-05-11 16:16             ` Björn Roy Baron
2023-05-11 16:46               ` TruongSinh Tran-Nguyen
2023-05-11 17:05                 ` Björn Roy Baron
2023-05-11 23:10                   ` TruongSinh Tran-Nguyen
2023-05-09 20:52     ` Andreas Hindborg [this message]
2023-05-10 17:56   ` Miguel Ojeda
2023-05-10 18:44     ` Kent Overstreet
2023-05-11 23:37       ` Miguel Ojeda

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=87mt2dcje2.fsf@metaspace.dk \
    --to=nmi@metaspace.dk \
    --cc=i@truongsinh.pro \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-bcachefs@vger.kernel.org \
    --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