public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Change Rust Binder crate name to rust_binder
@ 2026-03-10 14:53 Alice Ryhl
  2026-03-10 14:53 ` [PATCH v2 1/2] rust: support overriding crate_name Alice Ryhl
  2026-03-10 14:53 ` [PATCH v2 2/2] rust_binder: override crate name to rust_binder Alice Ryhl
  0 siblings, 2 replies; 13+ messages in thread
From: Alice Ryhl @ 2026-03-10 14:53 UTC (permalink / raw)
  To: Miguel Ojeda, Tamir Duberstein, Nathan Chancellor, Nicolas Schier
  Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Trevor Gross, Danilo Krummrich, Jesung Yang,
	Greg Kroah-Hartman, Carlos Llamas, linux-kbuild, linux-kernel,
	rust-for-linux, Alice Ryhl

Currently the crate name of the Rust Binder driver is rust_binder_main,
but I'd like it to be called rust_binder instead, matching the .ko file.
This affects e.g. symbol names in stack traces.

Thus, allow use of the #![crate_name] annotation, and set it for Rust
Binder.

I tried just using RUSTFLAGS_stem.o and RUSTFLAGS_REMOVE_stem.o, but
RUSTFLAGS_REMOVE_ is incapable of removing the --crate-name argument.
(Even after changing --crate-name to be passed with = instead of space
as the separator to the name.)

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Changes in v2:
- Do not pass --crate-name and specify crate name using annotation
  inside .rs file.
- Link to v1: https://lore.kernel.org/r/20260224-binder-crate-name-v1-0-7dfc1289abbd@google.com

---
Alice Ryhl (2):
      rust: support overriding crate_name
      rust_binder: override crate name to rust_binder

 drivers/android/binder/rust_binder_main.rs | 2 ++
 scripts/Makefile.build                     | 1 -
 scripts/generate_rust_analyzer.py          | 8 +++++++-
 3 files changed, 9 insertions(+), 2 deletions(-)
---
base-commit: 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681
change-id: 20260224-binder-crate-name-15f14e134fca

Best regards,
-- 
Alice Ryhl <aliceryhl@google.com>


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-03-10 22:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-10 14:53 [PATCH v2 0/2] Change Rust Binder crate name to rust_binder Alice Ryhl
2026-03-10 14:53 ` [PATCH v2 1/2] rust: support overriding crate_name Alice Ryhl
2026-03-10 15:05   ` Alice Ryhl
2026-03-10 15:45     ` Tamir Duberstein
2026-03-10 19:13       ` Miguel Ojeda
2026-03-10 19:38         ` Tamir Duberstein
2026-03-10 19:58           ` Alice Ryhl
2026-03-10 19:58           ` Miguel Ojeda
2026-03-10 20:01             ` Miguel Ojeda
2026-03-10 20:27               ` Tamir Duberstein
2026-03-10 22:36   ` Gary Guo
2026-03-10 14:53 ` [PATCH v2 2/2] rust_binder: override crate name to rust_binder Alice Ryhl
2026-03-10 19:10   ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox