qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Junjie Mao <junjie.mao@intel.com>
To: manos.pitsidianakis@linaro.org, pbonzini@redhat.com
Cc: alex.bennee@linaro.org, armbru@redhat.com, berrange@redhat.com,
	gustavo.romero@linaro.org, mads@ynddal.dk,
	marcandre.lureau@redhat.com, peter.maydell@linaro.org,
	philmd@linaro.org, pierrick.bouvier@linaro.org,
	qemu-devel@nongnu.org, richard.henderson@linaro.org,
	rowan.hart@intel.com, stefanha@redhat.com, thuth@redhat.com,
	zhao1.liu@intel.com
Subject: [RFC PATCH 0/2] meson: Specify Rust edition by rust_std=20XX
Date: Wed, 14 Aug 2024 17:08:18 +0800	[thread overview]
Message-ID: <20240814090820.1251026-1-junjie.mao@intel.com> (raw)

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


             reply	other threads:[~2024-08-14  0:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-14  9:08 Junjie Mao [this message]
2024-08-14  9:08 ` [RFC PATCH 1/2] meson: subprojects: Specify Rust edition by rust_std=20XX 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

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=20240814090820.1251026-1-junjie.mao@intel.com \
    --to=junjie.mao@intel.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=gustavo.romero@linaro.org \
    --cc=mads@ynddal.dk \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=rowan.hart@intel.com \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    --cc=zhao1.liu@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).