Re: [PATCH v2 2/2] rust_binder: override crate name to rust_binder

From: Miguel Ojeda

Date: Tue Mar 10 2026 - 15:11:58 EST


On Tue, Mar 10, 2026 at 3:53 PM Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
>
> // Copyright (C) 2025 Google LLC.
>
> +#![crate_name = "rust_binder"]
> //! Binder -- the Android IPC mechanism.
> +
> #![recursion_limit = "256"]
> #![allow(
> clippy::as_underscore,

So the crate name is a special crate attribute (together with
`crate_type, it is forbidden inside `cfg_attr`), so I think it makes
in a sense to put it between the SPDX/copyright block and the crate
docs. I also think you didn't add a newline to put it closer to the
title of the docs, as if it were a title of its own.

On the other hand, it is a crate attribute nevertheless, so putting it
together with the rest looks a bit more consistent, and as a title the
English one is probably the best one to see first anyway:

//! Binder -- the Android IPC mechanism.

#![crate_name = "rust_binder"]
#![recursion_limit = "256"]

Hopefully the crate names are still close to the file names (and I
would really not want people to abuse this...).

Cheers,
Miguel