qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] meson: Specify Rust edition by rust_std=20XX
@ 2024-08-14  9:08 Junjie Mao
  2024-08-14  9:08 ` [RFC PATCH 1/2] meson: subprojects: " Junjie Mao
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Junjie Mao @ 2024-08-14  9:08 UTC (permalink / raw)
  To: manos.pitsidianakis, pbonzini
  Cc: alex.bennee, armbru, berrange, gustavo.romero, mads,
	marcandre.lureau, peter.maydell, philmd, pierrick.bouvier,
	qemu-devel, richard.henderson, rowan.hart, stefanha, thuth,
	zhao1.liu

The official way to specify Rust edition in meson is the rust_std build option
[1]. It is used for generating --edition rustc options and filling
rust-project.json which provides project layout information to
rust-analyzer. Specifying Rust edition by rust_args instead causes meson to
generate "edition": "--edition" in rust-project.json, which is invalid.

Replace "--edition" rust_args with overriding of rust_std and build.rust_std to
fix the generated rust-project.json.

The rust_std option is part of the build environment and has two forms: rust_std
for the host machine and build.rust_std for the build machine. Specify both in
meson.build for completeness.

The default_options argument of project() is not used because it does not work
for rust_std in subprojects in meson 1.5.1.

This series is based on Paolo's refinement [2] to Manos's rust-pl011-rfc-v6
[3]. Feel free to squash these changes into that series.

[1] https://github.com/mesonbuild/meson/pull/7934
[2] https://gitlab.com/bonzini/qemu/-/tree/rust-for-manos
[3] https://lore.kernel.org/qemu-devel/rust-pl011-rfc-v6.git.manos.pitsidianakis@linaro.org

Junjie Mao (2):
  meson: subprojects: Specify Rust edition by rust_std=20XX
  rust: Specify Rust edition by rust_std=20XX

 rust/hw/char/pl011/meson.build                                | 4 +---
 rust/meson.build                                              | 4 +---
 rust/qemu-api/meson.build                                     | 2 +-
 subprojects/packagefiles/arbitrary-int-1-rs/meson.build       | 4 +---
 subprojects/packagefiles/bilge-impl-0.2-rs/meson.build        | 2 +-
 subprojects/packagefiles/either-1-rs/meson.build              | 2 +-
 subprojects/packagefiles/itertools-0.11-rs/meson.build        | 2 +-
 subprojects/packagefiles/proc-macro-error-1-rs/meson.build    | 2 +-
 .../packagefiles/proc-macro-error-attr-1-rs/meson.build       | 2 +-
 subprojects/packagefiles/proc-macro2-1-rs/meson.build         | 2 +-
 subprojects/packagefiles/quote-1-rs/meson.build               | 2 +-
 subprojects/packagefiles/syn-2-rs/meson.build                 | 2 +-
 subprojects/packagefiles/unicode-ident-1-rs/meson.build       | 4 +---
 13 files changed, 13 insertions(+), 21 deletions(-)

--
2.30.2


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

end of thread, other threads:[~2024-08-14 11:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-14  9:08 [RFC PATCH 0/2] meson: Specify Rust edition by rust_std=20XX Junjie Mao
2024-08-14  9:08 ` [RFC PATCH 1/2] meson: subprojects: " Junjie Mao
2024-08-14  9:08 ` [RFC PATCH 2/2] rust: " Junjie Mao
2024-08-14 11:19 ` [RFC PATCH 0/2] meson: " Manos Pitsidianakis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).