Skip to contentSkip to conversation

rust: use meson automatic parsing of Cargo.toml

PATCH In review Paolo Bonzini 2 participants 10 messages May 26

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover rust: use meson automatic parsing of Cargo.toml

These are relatively old patches, but it's time to post them now that the light is visible at the end of the Meson tunnel.

Meson 1.11.x greatly increased the ability to parse Cargo.toml and automatically build complete targets out of the information in there---this was more or less always the intention when Manos decided to build Rust crates with Meson, but it took some time to get there.

It still does not support cross compiling, but that should be added in 1.12.0 and should be completely transparent, so it is already possible to post patches for the final shape of the Meson rules.

With this change, it is possible to have a much more compact description of Rust devices in meson.build, compared to what was used before:

_libhpet_rs = cargo_ws.package('hpet').library() rust_devices_ss.add(when: 'CONFIG_X_HPET_RUST', if_true: [declare_dependency(

    link_whole: [_libhpet_rs],
    variables: {'crate': 'hpet'},

)])

For a description of Cargo support in Meson see
https://mesonbuild.com/Rust.html
and https://mesonbuild.com/Rust-module.html#workspace.

Paolo

Paolo Bonzini (6):
meson: use compiler_target() to get rustc target
rust: switch to cargo subprojects
rust: switch to autogenerated meson rules
rust: remove unnecessary wrap files
rust: use meson automatic parsing of Cargo.toml
scripts: remove now dead parts of rustc_args.py

 configure                                     |  3 -
 meson.build                                   | 13 +--
 rust/Cargo.lock => Cargo.lock                 |  0
 rust/Cargo.toml => Cargo.toml                 |  6 +-
 rust/bindings/chardev-sys/meson.build         | 11 +--
 rust/bindings/hwcore-sys/meson.build          | 11 +--
 rust/bindings/migration-sys/meson.build       | 11 +--
 rust/bindings/qom-sys/meson.build             | 11 +--
 rust/bindings/system-sys/meson.build          | 11 +--
 rust/bindings/util-sys/meson.build            | 11 +--
 rust/bits/meson.build                         |  7 +-
 rust/bql/meson.build                          | 13 +--
 rust/chardev/meson.build                      |  8 +-
 rust/common/meson.build                       | 10 +--
 rust/hw/char/pl011/meson.build                | 22 +----
 rust/hw/core/meson.build                      | 10 +--
 rust/hw/timer/hpet/meson.build                | 17 +---
 rust/meson.build                              | 32 +-------
 rust/migration/meson.build                    |  8 +-
 rust/qemu-macros/meson.build                  | 12 +--
 rust/qom/meson.build                          |  8 +-
 rust/system/meson.build                       |  8 +-
 rust/trace/meson.build                        |  9 +--
 rust/util/meson.build                         |  7 +-
 scripts/qapi/rs_types.py                      |  2 +-
 scripts/rust/rustc_args.py                    | 80 +------------------
 subprojects/anyhow-1-rs.wrap                  |  7 --
 subprojects/arbitrary-int-1-rs.wrap           | 10 ---
 subprojects/attrs-0.2-rs.wrap                 |  7 --
 subprojects/bilge-0.2-rs.wrap                 | 10 ---
 subprojects/bilge-impl-0.2-rs.wrap            | 10 ---
 subprojects/either-1-rs.wrap                  | 10 ---
 subprojects/foreign-0.3-rs.wrap               |  7 --
 subprojects/glib-sys-0.21-rs.wrap             |  7 --
 subprojects/itertools-0.11-rs.wrap            | 10 ---
 subprojects/libc-0.2-rs.wrap                  |  7 --
 .../packagefiles/anyhow-1-rs/meson.build      | 33 --------
 .../anyhow-1-rs/meson/meson.build             |  9 +++
 .../arbitrary-int-1-rs/meson.build            | 21 -----
 .../packagefiles/attrs-0.2-rs/meson.build     | 33 --------
 .../packagefiles/bilge-0.2-rs/meson.build     | 31 -------
 .../bilge-impl-0.2-rs/meson.build             | 44 ----------
 .../bilge-impl-0.2-rs/meson/meson.build       |  3 +
 .../packagefiles/either-1-rs/meson.build      | 26 ------
 .../packagefiles/foreign-0.3-rs/meson.build   | 26 ------
 .../packagefiles/glib-sys-0.21-rs/meson.build | 33 --------
 .../itertools-0.11-rs/meson.build             | 32 --------
 .../packagefiles/libc-0.2-rs/meson.build      | 37 ---------
 .../libc-0.2-rs/meson/meson.build             | 16 ++++
 .../proc-macro-error-1-rs/meson.build         | 41 ----------
 .../proc-macro-error-1-rs/meson/meson.build   |  3 +
 .../proc-macro-error-attr-1-rs/meson.build    | 31 -------
 .../meson/meson.build                         |  3 +
 .../packagefiles/proc-macro2-1-rs/meson.build | 35 --------
 .../proc-macro2-1-rs/meson/meson.build        |  6 ++
 .../packagefiles/quote-1-rs/meson.build       | 31 -------
 .../packagefiles/serde-1-rs/meson.build       | 36 ---------
 .../packagefiles/serde_core-1-rs/meson.build  | 25 ------
 .../serde_core-1-rs/private.rs.in             |  6 ++
 .../serde_derive-1-rs/meson.build             | 35 --------
 subprojects/packagefiles/syn-2-rs/meson.build | 43 ----------
 .../unicode-ident-1-rs/meson.build            | 22 -----
 subprojects/probe-0.5-rs.wrap                 |  7 --
 subprojects/proc-macro-error-1-rs.wrap        | 10 ---
 subprojects/proc-macro-error-attr-1-rs.wrap   | 10 ---
 subprojects/proc-macro2-1-rs.wrap             | 10 ---
 subprojects/quote-1-rs.wrap                   | 10 ---
 subprojects/serde-1-rs.wrap                   |  5 +-
 subprojects/serde_core-1-rs.wrap              |  5 +-
 subprojects/serde_derive-1-rs.wrap            |  5 +-
 subprojects/syn-2-rs.wrap                     | 10 ---
 subprojects/unicode-ident-1-rs.wrap           | 10 ---
 72 files changed, 116 insertions(+), 1053 deletions(-)
 rename rust/Cargo.lock => Cargo.lock (100%)
 rename rust/Cargo.toml => Cargo.toml (97%)
 delete mode 100644 subprojects/anyhow-1-rs.wrap
 delete mode 100644 subprojects/arbitrary-int-1-rs.wrap
 delete mode 100644 subprojects/attrs-0.2-rs.wrap
 delete mode 100644 subprojects/bilge-0.2-rs.wrap
 delete mode 100644 subprojects/bilge-impl-0.2-rs.wrap
 delete mode 100644 subprojects/either-1-rs.wrap
 delete mode 100644 subprojects/foreign-0.3-rs.wrap
 delete mode 100644 subprojects/glib-sys-0.21-rs.wrap
 delete mode 100644 subprojects/itertools-0.11-rs.wrap
 delete mode 100644 subprojects/libc-0.2-rs.wrap
 delete mode 100644 subprojects/packagefiles/anyhow-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/anyhow-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/arbitrary-int-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/attrs-0.2-rs/meson.build
 delete mode 100644 subprojects/packagefiles/bilge-0.2-rs/meson.build
 delete mode 100644 subprojects/packagefiles/bilge-impl-0.2-rs/meson.build
 create mode 100644 subprojects/packagefiles/bilge-impl-0.2-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/either-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/foreign-0.3-rs/meson.build
 delete mode 100644 subprojects/packagefiles/glib-sys-0.21-rs/meson.build
 delete mode 100644 subprojects/packagefiles/itertools-0.11-rs/meson.build
 delete mode 100644 subprojects/packagefiles/libc-0.2-rs/meson.build
 create mode 100644 subprojects/packagefiles/libc-0.2-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/proc-macro-error-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/proc-macro-error-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/proc-macro-error-attr-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/proc-macro-error-attr-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/proc-macro2-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/proc-macro2-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/quote-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/serde-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/serde_core-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/serde_core-1-rs/private.rs.in
 delete mode 100644 subprojects/packagefiles/serde_derive-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/syn-2-rs/meson.build
 delete mode 100644 subprojects/packagefiles/unicode-ident-1-rs/meson.build
 delete mode 100644 subprojects/probe-0.5-rs.wrap
 delete mode 100644 subprojects/proc-macro-error-1-rs.wrap
 delete mode 100644 subprojects/proc-macro-error-attr-1-rs.wrap
 delete mode 100644 subprojects/proc-macro2-1-rs.wrap
 delete mode 100644 subprojects/quote-1-rs.wrap
 delete mode 100644 subprojects/syn-2-rs.wrap
 delete mode 100644 subprojects/unicode-ident-1-rs.wrap
Signature · 1 line
2.54.0
#1 lore raw

PATCH 1/6 meson: use compiler_target() to get rustc target

The new method in Meson 1.11.x removes the need to pass the triple via config-host.mak.

---
 configure   | 3 ---
 meson.build | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)
configure +0 -3
index e138d83bc9f..fdd2294db68 100755
@@ -1747,9 +1747,6 @@ if test "$runc" != no; then
     echo "CONTAINER_ENGINE=$container_engine" >> $config_host_mak
 fi
 echo "SUBDIRS=$subdirs" >> $config_host_mak
-if test "$rust" != disabled; then
-  echo "RUST_TARGET_TRIPLE=$rust_target_triple" >> $config_host_mak
-fi
 echo "PYTHON=$python" >> $config_host_mak
 echo "MKVENV_ENSUREGROUP=$mkvenv ensuregroup $mkvenv_online_flag" >> $config_host_mak
 echo "GENISOIMAGE=$genisoimage" >> $config_host_mak
meson.build +1 -1
index bda5180c436..c265a00aed6 100644
@@ -4727,7 +4727,7 @@ else
 endif
 summary_info += {'Rust support':      have_rust}
 if have_rust
-  summary_info += {'Rust target':     config_host['RUST_TARGET_TRIPLE']}
+  summary_info += {'Rust target':     rust.compiler_target(native: false)}
   summary_info += {'rustc':           ' '.join(rustc.cmd_array())}
   summary_info += {'rustc version':   rustc.version()}
   summary_info += {'rustdoc':         rustdoc}
Signature · 1 line
2.54.0
#2 lore raw

PATCH 2/6 rust: switch to cargo subprojects

In reply to Paolo Bonzini

Let Meson parse Cargo.lock and Cargo.toml and figure out the set of Rust build dependencies. For now, the only change is that subprojects are retrieved with "cargo_ws.subproject('NAME')" instead of "subproject('NAME-API-rs')". However, just calling "import('rust').workspace()" enables extra functionality that operates by parsing Cargo.toml; it will be introduced a step at a time in subsequent commits.

---
 meson.build                                 |  3 +-
 rust/Cargo.lock => Cargo.lock               |  0
 rust/Cargo.toml => Cargo.toml               |  6 +--
 rust/meson.build                            | 43 +++++++--------------
 subprojects/anyhow-1-rs.wrap                |  5 ++-
 subprojects/arbitrary-int-1-rs.wrap         |  2 +-
 subprojects/attrs-0.2-rs.wrap               |  5 ++-
 subprojects/bilge-0.2-rs.wrap               |  2 +-
 subprojects/bilge-impl-0.2-rs.wrap          |  4 +-
 subprojects/either-1-rs.wrap                |  4 +-
 subprojects/foreign-0.3-rs.wrap             |  5 ++-
 subprojects/glib-sys-0.21-rs.wrap           |  5 ++-
 subprojects/itertools-0.11-rs.wrap          |  4 +-
 subprojects/libc-0.2-rs.wrap                |  2 +-
 subprojects/probe-0.5-rs.wrap               |  5 ++-
 subprojects/proc-macro-error-1-rs.wrap      |  4 +-
 subprojects/proc-macro-error-attr-1-rs.wrap |  4 +-
 subprojects/proc-macro2-1-rs.wrap           |  4 +-
 subprojects/quote-1-rs.wrap                 |  4 +-
 subprojects/serde-1-rs.wrap                 |  4 +-
 subprojects/serde_core-1-rs.wrap            |  4 +-
 subprojects/serde_derive-1-rs.wrap          |  4 +-
 subprojects/syn-2-rs.wrap                   |  4 +-
 subprojects/unicode-ident-1-rs.wrap         |  4 +-
 24 files changed, 66 insertions(+), 65 deletions(-)
 rename rust/Cargo.lock => Cargo.lock (100%)
 rename rust/Cargo.toml => Cargo.toml (97%)
meson.build +2 -1
index c265a00aed6..91d74fa198c 100644
@@ -130,7 +130,8 @@ endif
 if have_rust
   rustc_args = [find_program('scripts/rust/rustc_args.py'),
     '--rustc-version', rustc.version(),
-    '--workspace', meson.project_source_root() / 'rust']
+    '--workspace', meson.project_source_root()]
+
   rustfmt = find_program('rustfmt', required: false)
 
   rustc_lint_args = run_command(rustc_args, '--lints',
Cargo.lock renamed from rust/Cargo.lock +0 -0
similarity index 100%
rename from rust/Cargo.lock
rename to Cargo.lock
Cargo.toml renamed from rust/Cargo.toml +3 -3
similarity index 97%
rename from rust/Cargo.toml
rename to Cargo.toml
index 15296ac8636..6bd38e2d8e1 100644
@@ -1,9 +1,9 @@
 [workspace]
 resolver = "2"
 members = [
-    "hw/char/pl011",
-    "hw/timer/hpet",
-    "tests",
+    "rust/hw/char/pl011",
+    "rust/hw/timer/hpet",
+    "rust/tests",
 ]
 
 [workspace.package]
rust/meson.build +14 -29

49 lines not on this page · raw message

subprojects/anyhow-1-rs.wrap +4 -1
index a69a3645b49..132c70c467e 100644
@@ -3,5 +3,8 @@ directory = anyhow-1.0.98
 source_url = https://crates.io/api/v1/crates/anyhow/1.0.98/download
 source_filename = anyhow-1.0.98.tar.gz
 source_hash = e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487
-#method = cargo
+method = cargo
 patch_directory = anyhow-1-rs
+
+# bump this version number on every change to meson.build or the patches:
+# v2
subprojects/arbitrary-int-1-rs.wrap +1 -1
index a1838b20b0f..f8d7c68da64 100644
@@ -3,7 +3,7 @@ directory = arbitrary-int-1.2.7
 source_url = https://crates.io/api/v1/crates/arbitrary-int/1.2.7/download
 source_filename = arbitrary-int-1.2.7.tar.gz
 source_hash = c84fc003e338a6f69fbd4f7fe9f92b535ff13e9af8997f3b14b6ddff8b1df46d
-#method = cargo
+method = cargo
 patch_directory = arbitrary-int-1-rs
 
 # bump this version number on every change to meson.build or the patches:
subprojects/attrs-0.2-rs.wrap +4 -1
index cd43c91d63e..99d2e43fb3b 100644
@@ -3,5 +3,8 @@ directory = attrs-0.2.9
 source_url = https://crates.io/api/v1/crates/attrs/0.2.9/download
 source_filename = attrs-0.2.9.tar.gz
 source_hash = 2a207d40f43de65285f3de0509bb6cb16bc46098864fce957122bbacce327e5f
-#method = cargo
+method = cargo
 patch_directory = attrs-0.2-rs
+
+# bump this version number on every change to meson.build or the patches:
+# v2
subprojects/bilge-0.2-rs.wrap +1 -1
index 900bb1497b9..cb202cfd9fe 100644
@@ -3,7 +3,7 @@ directory = bilge-0.2.0
 source_url = https://crates.io/api/v1/crates/bilge/0.2.0/download
 source_filename = bilge-0.2.0.tar.gz
 source_hash = dc707ed8ebf81de5cd6c7f48f54b4c8621760926cdf35a57000747c512e67b57
-#method = cargo
+method = cargo
 patch_directory = bilge-0.2-rs
 
 # bump this version number on every change to meson.build or the patches:
subprojects/bilge-impl-0.2-rs.wrap +2 -2
index 4f84eca1ccd..e423b6cec66 100644
@@ -3,8 +3,8 @@ directory = bilge-impl-0.2.0
 source_url = https://crates.io/api/v1/crates/bilge-impl/0.2.0/download
 source_filename = bilge-impl-0.2.0.tar.gz
 source_hash = feb11e002038ad243af39c2068c8a72bcf147acf05025dcdb916fcc000adb2d8
-#method = cargo
+method = cargo
 patch_directory = bilge-impl-0.2-rs
 
 # bump this version number on every change to meson.build or the patches:
-# v2
+# v3
subprojects/either-1-rs.wrap +2 -2
index 352e11cfee6..b70787d882e 100644
@@ -3,8 +3,8 @@ directory = either-1.12.0
 source_url = https://crates.io/api/v1/crates/either/1.12.0/download
 source_filename = either-1.12.0.tar.gz
 source_hash = 3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b
-#method = cargo
+method = cargo
 patch_directory = either-1-rs
 
 # bump this version number on every change to meson.build or the patches:
-# v2
+# v3
subprojects/foreign-0.3-rs.wrap +4 -1
index 0d218ec2c25..bae22b1f2a3 100644
@@ -3,5 +3,8 @@ directory = foreign-0.3.1
 source_url = https://crates.io/api/v1/crates/foreign/0.3.1/download
 source_filename = foreign-0.3.1.tar.gz
 source_hash = 17ca1b5be8c9d320daf386f1809c7acc0cb09accbae795c2001953fa50585846
-#method = cargo
+method = cargo
 patch_directory = foreign-0.3-rs
+
+# bump this version number on every change to meson.build or the patches:
+# v2
subprojects/glib-sys-0.21-rs.wrap +4 -1
index 313ced731ac..af849352a38 100644
@@ -3,5 +3,8 @@ directory = glib-sys-0.21.2
 source_url = https://crates.io/api/v1/crates/glib-sys/0.21.2/download
 source_filename = glib-sys-0.21.2.tar.gz
 source_hash = d09d3d0fddf7239521674e57b0465dfbd844632fec54f059f7f56112e3f927e1
-#method = cargo
+method = cargo
 patch_directory = glib-sys-0.21-rs
+
+# bump this version number on every change to meson.build or the patches:
+# v2
subprojects/itertools-0.11-rs.wrap +2 -2
index ee12d0053bc..b52a2314340 100644
@@ -3,8 +3,8 @@ directory = itertools-0.11.0
 source_url = https://crates.io/api/v1/crates/itertools/0.11.0/download
 source_filename = itertools-0.11.0.tar.gz
 source_hash = b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57
-#method = cargo
+method = cargo
 patch_directory = itertools-0.11-rs
 
 # bump this version number on every change to meson.build or the patches:
-# v2
+# v3
subprojects/libc-0.2-rs.wrap +1 -1
index bbe08f87883..488330178ed 100644
@@ -3,5 +3,5 @@ directory = libc-0.2.162
 source_url = https://crates.io/api/v1/crates/libc/0.2.162/download
 source_filename = libc-0.2.162.tar.gz
 source_hash = 18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398
-#method = cargo
+method = cargo
 patch_directory = libc-0.2-rs
subprojects/probe-0.5-rs.wrap +4 -1
index 73229ee1c29..bd23c0ea789 100644
@@ -3,5 +3,8 @@ directory = probe-0.5.2
 source_url = https://crates.io/api/v1/crates/probe/0.5.2/download
 source_filename = probe-0.5.2.tar.gz
 source_hash = 136558b6e1ebaecc92755d0ffaf9421f519531bed30cc2ad23b22cb00965cc5e
-#method = cargo
+method = cargo
 patch_directory = probe-0.5-rs
+
+# bump this version number on every change to meson.build or the patches:
+# v1
subprojects/proc-macro-error-1-rs.wrap +2 -2
index 59f892f7825..e57921bfadc 100644
@@ -3,8 +3,8 @@ directory = proc-macro-error-1.0.4
 source_url = https://crates.io/api/v1/crates/proc-macro-error/1.0.4/download
 source_filename = proc-macro-error-1.0.4.tar.gz
 source_hash = da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c
-#method = cargo
+method = cargo
 patch_directory = proc-macro-error-1-rs
 
 # bump this version number on every change to meson.build or the patches:
-# v2
+# v3
subprojects/proc-macro-error-attr-1-rs.wrap +2 -2
index 5aeb224a103..02d18f3393d 100644
@@ -3,8 +3,8 @@ directory = proc-macro-error-attr-1.0.4
 source_url = https://crates.io/api/v1/crates/proc-macro-error-attr/1.0.4/download
 source_filename = proc-macro-error-attr-1.0.4.tar.gz
 source_hash = a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869
-#method = cargo
+method = cargo
 patch_directory = proc-macro-error-attr-1-rs
 
 # bump this version number on every change to meson.build or the patches:
-# v2
+# v3
subprojects/proc-macro2-1-rs.wrap +2 -2
index 0f06cd8e111..676d1a3a8ca 100644
@@ -3,8 +3,8 @@ directory = proc-macro2-1.0.95
 source_url = https://crates.io/api/v1/crates/proc-macro2/1.0.95/download
 source_filename = proc-macro2-1.0.95.0.tar.gz
 source_hash = 02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778
-#method = cargo
+method = cargo
 patch_directory = proc-macro2-1-rs
 
 # bump this version number on every change to meson.build or the patches:
-# v2
+# v3
subprojects/quote-1-rs.wrap +2 -2
index 8b721dfa00b..dab58490a4f 100644
@@ -3,8 +3,8 @@ directory = quote-1.0.36
 source_url = https://crates.io/api/v1/crates/quote/1.0.36/download
 source_filename = quote-1.0.36.0.tar.gz
 source_hash = 0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7
-#method = cargo
+method = cargo
 patch_directory = quote-1-rs
 
 # bump this version number on every change to meson.build or the patches:
-# v2
+# v3
subprojects/serde-1-rs.wrap +2 -2
index 56746dd0f43..9792592d480 100644
@@ -3,9 +3,9 @@ directory = serde-1.0.226
 source_url = https://crates.io/api/v1/crates/serde/1.0.226/download
 source_filename = serde-1.0.226.0.tar.gz
 source_hash = 0dca6411025b24b60bfa7ec1fe1f8e710ac09782dca409ee8237ba74b51295fd
-#method = cargo
+method = cargo
 diff_files = serde-1.0.226-include.patch
 patch_directory = serde-1-rs
 
 # bump this version number on every change to meson.build or the patches:
-# v1
+# v2
subprojects/serde_core-1-rs.wrap +2 -2
index 3692e754935..ff2e59430b1 100644
@@ -3,9 +3,9 @@ directory = serde_core-1.0.226
 source_url = https://crates.io/api/v1/crates/serde_core/1.0.226/download
 source_filename = serde_core-1.0.226.0.tar.gz
 source_hash = ba2ba63999edb9dac981fb34b3e5c0d111a69b0924e253ed29d83f7c99e966a4
-#method = cargo
+method = cargo
 diff_files = serde_core-1.0.226-include.patch
 patch_directory = serde_core-1-rs
 
 # bump this version number on every change to meson.build or the patches:
-# v1
+# v2
subprojects/serde_derive-1-rs.wrap +2 -2
index 00c92dc79cf..ed345a7f840 100644
@@ -3,9 +3,9 @@ directory = serde_derive-1.0.226
 source_url = https://crates.io/api/v1/crates/serde_derive/1.0.226/download
 source_filename = serde_derive-1.0.226.0.tar.gz
 source_hash = 8db53ae22f34573731bafa1db20f04027b2d25e02d8205921b569171699cdb33
-#method = cargo
+method = cargo
 diff_files = serde_derive-1.0.226-include.patch
 patch_directory = serde_derive-1-rs
 
 # bump this version number on every change to meson.build or the patches:
-# v1
+# v2
subprojects/syn-2-rs.wrap +2 -2
index 1e5e9d9fb6e..4b545c7980c 100644
@@ -3,8 +3,8 @@ directory = syn-2.0.104
 source_url = https://crates.io/api/v1/crates/syn/2.0.104/download
 source_filename = syn-2.0.104.0.tar.gz
 source_hash = 17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40
-#method = cargo
+method = cargo
 patch_directory = syn-2-rs
 
 # bump this version number on every change to meson.build or the patches:
-# v2
+# v3
subprojects/unicode-ident-1-rs.wrap +2 -2
index 50988f612e2..0a5e097953e 100644
@@ -3,8 +3,8 @@ directory = unicode-ident-1.0.12
 source_url = https://crates.io/api/v1/crates/unicode-ident/1.0.12/download
 source_filename = unicode-ident-1.0.12.tar.gz
 source_hash = 3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b
-#method = cargo
+method = cargo
 patch_directory = unicode-ident-1-rs
 
 # bump this version number on every change to meson.build or the patches:
-# v2
+# v3
Signature · 1 line
2.54.0
#3 lore raw

PATCH 3/6 rust: switch to autogenerated meson rules

In reply to Paolo Bonzini

Meson can automatically generate most of the build rules for subprojects, based on the contents of their Cargo.toml. Handwritten snippets can be placed in meson/meson.build to replace build.rs.

---
 scripts/qapi/rs_types.py                      |  2 +-
 subprojects/arbitrary-int-1-rs.wrap           |  1 -
 subprojects/attrs-0.2-rs.wrap                 |  1 -
 subprojects/bilge-0.2-rs.wrap                 |  1 -
 subprojects/either-1-rs.wrap                  |  1 -
 subprojects/foreign-0.3-rs.wrap               |  1 -
 subprojects/glib-sys-0.21-rs.wrap             |  1 -
 subprojects/itertools-0.11-rs.wrap            |  1 -
 .../packagefiles/anyhow-1-rs/meson.build      | 33 --------------
 .../anyhow-1-rs/meson/meson.build             |  9 ++++
 .../arbitrary-int-1-rs/meson.build            | 21 ---------
 .../packagefiles/attrs-0.2-rs/meson.build     | 33 --------------
 .../packagefiles/bilge-0.2-rs/meson.build     | 31 -------------
 .../bilge-impl-0.2-rs/meson.build             | 44 -------------------
 .../bilge-impl-0.2-rs/meson/meson.build       |  3 ++
 .../packagefiles/either-1-rs/meson.build      | 26 -----------
 .../packagefiles/foreign-0.3-rs/meson.build   | 26 -----------
 .../packagefiles/glib-sys-0.21-rs/meson.build | 33 --------------
 .../itertools-0.11-rs/meson.build             | 32 --------------
 .../packagefiles/libc-0.2-rs/meson.build      | 37 ----------------
 .../libc-0.2-rs/meson/meson.build             | 16 +++++++
 .../proc-macro-error-1-rs/meson.build         | 41 -----------------
 .../proc-macro-error-1-rs/meson/meson.build   |  3 ++
 .../proc-macro-error-attr-1-rs/meson.build    | 31 -------------
 .../meson/meson.build                         |  3 ++
 .../packagefiles/proc-macro2-1-rs/meson.build | 35 ---------------
 .../proc-macro2-1-rs/meson/meson.build        |  6 +++
 .../packagefiles/quote-1-rs/meson.build       | 31 -------------
 .../packagefiles/serde-1-rs/meson.build       | 36 ---------------
 .../packagefiles/serde_core-1-rs/meson.build  | 25 -----------
 .../serde_core-1-rs/private.rs.in             |  6 +++
 .../serde_derive-1-rs/meson.build             | 35 ---------------
 subprojects/packagefiles/syn-2-rs/meson.build | 43 ------------------
 .../unicode-ident-1-rs/meson.build            | 22 ----------
 subprojects/probe-0.5-rs.wrap                 |  1 -
 subprojects/quote-1-rs.wrap                   |  1 -
 subprojects/serde-1-rs.wrap                   |  1 -
 subprojects/serde_core-1-rs.wrap              |  1 -
 subprojects/serde_derive-1-rs.wrap            |  1 -
 subprojects/syn-2-rs.wrap                     |  1 -
 subprojects/unicode-ident-1-rs.wrap           |  1 -
 41 files changed, 47 insertions(+), 630 deletions(-)
 delete mode 100644 subprojects/packagefiles/anyhow-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/anyhow-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/arbitrary-int-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/attrs-0.2-rs/meson.build
 delete mode 100644 subprojects/packagefiles/bilge-0.2-rs/meson.build
 delete mode 100644 subprojects/packagefiles/bilge-impl-0.2-rs/meson.build
 create mode 100644 subprojects/packagefiles/bilge-impl-0.2-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/either-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/foreign-0.3-rs/meson.build
 delete mode 100644 subprojects/packagefiles/glib-sys-0.21-rs/meson.build
 delete mode 100644 subprojects/packagefiles/itertools-0.11-rs/meson.build
 delete mode 100644 subprojects/packagefiles/libc-0.2-rs/meson.build
 create mode 100644 subprojects/packagefiles/libc-0.2-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/proc-macro-error-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/proc-macro-error-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/proc-macro-error-attr-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/proc-macro-error-attr-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/proc-macro2-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/proc-macro2-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/quote-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/serde-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/serde_core-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/serde_core-1-rs/private.rs.in
 delete mode 100644 subprojects/packagefiles/serde_derive-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/syn-2-rs/meson.build
 delete mode 100644 subprojects/packagefiles/unicode-ident-1-rs/meson.build
scripts/qapi/rs_types.py +1 -1
index e24f14af03d..3a8cf0e3e4b 100644
@@ -348,7 +348,7 @@ def visit_begin(self, schema: QAPISchema) -> None:
 // that *could* be Eq too.
 #![allow(clippy::derive_partial_eq_without_eq)]
 
-use serde_derive::{Serialize, Deserialize};
+use serde::{Serialize, Deserialize};
 
 use util::qobject::QObject;
 '''))
subprojects/arbitrary-int-1-rs.wrap +0 -1
index f8d7c68da64..5cf4b11e4a3 100644
@@ -4,7 +4,6 @@ source_url = https://crates.io/api/v1/crates/arbitrary-int/1.2.7/download
 source_filename = arbitrary-int-1.2.7.tar.gz
 source_hash = c84fc003e338a6f69fbd4f7fe9f92b535ff13e9af8997f3b14b6ddff8b1df46d
 method = cargo
-patch_directory = arbitrary-int-1-rs
 
 # bump this version number on every change to meson.build or the patches:
 # v2
subprojects/attrs-0.2-rs.wrap +0 -1
index 99d2e43fb3b..dcdddf005f6 100644
@@ -4,7 +4,6 @@ source_url = https://crates.io/api/v1/crates/attrs/0.2.9/download
 source_filename = attrs-0.2.9.tar.gz
 source_hash = 2a207d40f43de65285f3de0509bb6cb16bc46098864fce957122bbacce327e5f
 method = cargo
-patch_directory = attrs-0.2-rs
 
 # bump this version number on every change to meson.build or the patches:
 # v2
subprojects/bilge-0.2-rs.wrap +0 -1
index cb202cfd9fe..cff10f6710d 100644
@@ -4,7 +4,6 @@ source_url = https://crates.io/api/v1/crates/bilge/0.2.0/download
 source_filename = bilge-0.2.0.tar.gz
 source_hash = dc707ed8ebf81de5cd6c7f48f54b4c8621760926cdf35a57000747c512e67b57
 method = cargo
-patch_directory = bilge-0.2-rs
 
 # bump this version number on every change to meson.build or the patches:
 # v2
subprojects/either-1-rs.wrap +0 -1
index b70787d882e..d2808d3d7fb 100644
@@ -4,7 +4,6 @@ source_url = https://crates.io/api/v1/crates/either/1.12.0/download
 source_filename = either-1.12.0.tar.gz
 source_hash = 3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b
 method = cargo
-patch_directory = either-1-rs
 
 # bump this version number on every change to meson.build or the patches:
 # v3
subprojects/foreign-0.3-rs.wrap +0 -1
index bae22b1f2a3..e4aa7f11fc0 100644
@@ -4,7 +4,6 @@ source_url = https://crates.io/api/v1/crates/foreign/0.3.1/download
 source_filename = foreign-0.3.1.tar.gz
 source_hash = 17ca1b5be8c9d320daf386f1809c7acc0cb09accbae795c2001953fa50585846
 method = cargo
-patch_directory = foreign-0.3-rs
 
 # bump this version number on every change to meson.build or the patches:
 # v2
subprojects/glib-sys-0.21-rs.wrap +0 -1
index af849352a38..4723f7f63be 100644
@@ -4,7 +4,6 @@ source_url = https://crates.io/api/v1/crates/glib-sys/0.21.2/download
 source_filename = glib-sys-0.21.2.tar.gz
 source_hash = d09d3d0fddf7239521674e57b0465dfbd844632fec54f059f7f56112e3f927e1
 method = cargo
-patch_directory = glib-sys-0.21-rs
 
 # bump this version number on every change to meson.build or the patches:
 # v2
subprojects/itertools-0.11-rs.wrap +0 -1
index b52a2314340..fc63e2f57d9 100644
@@ -4,7 +4,6 @@ source_url = https://crates.io/api/v1/crates/itertools/0.11.0/download
 source_filename = itertools-0.11.0.tar.gz
 source_hash = b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57
 method = cargo
-patch_directory = itertools-0.11-rs
 
 # bump this version number on every change to meson.build or the patches:
 # v3
subprojects/packagefiles/anyhow-1-rs/meson.build deleted +0 -33
deleted file mode 100644
index 348bab98b9f..00000000000
@@ -1,33 +0,0 @@
-project('anyhow-1-rs', 'rust',
-  meson_version: '>=1.5.0',
-  version: '1.0.98',
-  license: 'MIT OR Apache-2.0',
-  default_options: [])
-
-rustc = meson.get_compiler('rust')
-
-rust_args = ['--cap-lints', 'allow']
-rust_args += ['--cfg', 'feature="std"']
-if rustc.version().version_compare('<1.65.0')
-  error('rustc version ' + rustc.version() + ' is unsupported. Please upgrade to at least 1.65.0')
-endif
-rust_args += [ '--cfg', 'std_backtrace' ] # >= 1.65.0
-if rustc.version().version_compare('<1.81.0')
-  rust_args += [ '--cfg', 'anyhow_no_core_error' ]
-endif
-
-_anyhow_rs = static_library(
-  'anyhow',
-  files('src/lib.rs'),
-  gnu_symbol_visibility: 'hidden',
-  override_options: ['rust_std=2018', 'build.rust_std=2018'],
-  rust_abi: 'rust',
-  rust_args: rust_args,
-  dependencies: [],
-)
-
-anyhow_dep = declare_dependency(
-  link_with: _anyhow_rs,
-)
-
-meson.override_dependency('anyhow-1-rs', anyhow_dep)
subprojects/packagefiles/anyhow-1-rs/meson/meson.build new file +9 -0
new file mode 100644
index 00000000000..91c46539c31
@@ -0,0 +1,9 @@
+rustc = meson.get_compiler('rust')
+
+if rustc.version().version_compare('<1.65.0')
+  error('rustc version ' + rustc.version() + ' is unsupported. Please upgrade to at least 1.65.0')
+endif
+extra_args += [ '--cfg', 'std_backtrace' ] # >= 1.65.0
+if rustc.version().version_compare('<1.81.0')
+  extra_args += [ '--cfg', 'anyhow_no_core_error' ]
+endif
subprojects/packagefiles/arbitrary-int-1-rs/meson.build deleted +0 -21
deleted file mode 100644
index 00733d1faab..00000000000
@@ -1,21 +0,0 @@
-project('arbitrary-int-1-rs', 'rust',
-  meson_version: '>=1.5.0',
-  version: '1.2.7',
-  license: 'MIT',
-  default_options: [])
-
-_arbitrary_int_rs = static_library(
-  'arbitrary_int',
-  files('src/lib.rs'),
-  gnu_symbol_visibility: 'hidden',
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_args: ['--cap-lints', 'allow'],
-  rust_abi: 'rust',
-  dependencies: [],
-)
-
-arbitrary_int_dep = declare_dependency(
-  link_with: _arbitrary_int_rs,
-)
-
-meson.override_dependency('arbitrary-int-1-rs', arbitrary_int_dep)
subprojects/packagefiles/attrs-0.2-rs/meson.build deleted +0 -33
deleted file mode 100644
index ee575476cb2..00000000000
@@ -1,33 +0,0 @@
-project('attrs-0.2-rs', 'rust',
-  meson_version: '>=1.5.0',
-  version: '0.2.9',
-  license: 'MIT OR Apache-2.0',
-  default_options: [])
-
-subproject('proc-macro2-1-rs', required: true)
-subproject('syn-2-rs', required: true)
-
-proc_macro2_dep = dependency('proc-macro2-1-rs', native: true)
-syn_dep = dependency('syn-2-rs', native: true)
-
-_attrs_rs = static_library(
-  'attrs',
-  files('src/lib.rs'),
-  gnu_symbol_visibility: 'hidden',
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  rust_args: [
-    '--cap-lints', 'allow',
-  ],
-  dependencies: [
-    proc_macro2_dep,
-    syn_dep,
-  ],
-  native: true,
-)
-
-attrs_dep = declare_dependency(
-  link_with: _attrs_rs,
-)
-
-meson.override_dependency('attrs-0.2-rs', attrs_dep, native: true)
subprojects/packagefiles/bilge-0.2-rs/meson.build deleted +0 -31
deleted file mode 100644
index ce13d0fe80f..00000000000
@@ -1,31 +0,0 @@
-project(
-  'bilge-0.2-rs',
-  'rust',
-  meson_version: '>=1.5.0',
-  version : '0.2.0',
-  license : 'MIT or Apache-2.0',
-)
-
-subproject('arbitrary-int-1-rs', required: true)
-subproject('bilge-impl-0.2-rs', required: true)
-
-arbitrary_int_dep = dependency('arbitrary-int-1-rs')
-bilge_impl_dep = dependency('bilge-impl-0.2-rs')
-
-lib = static_library(
-  'bilge',
-  'src/lib.rs',
-  override_options : ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi : 'rust',
-  rust_args: ['--cap-lints', 'allow'],
-  dependencies: [
-    arbitrary_int_dep,
-    bilge_impl_dep,
-  ],
-)
-
-bilge_dep = declare_dependency(
-  link_with : [lib],
-)
-
-meson.override_dependency('bilge-0.2-rs', bilge_dep)
subprojects/packagefiles/bilge-impl-0.2-rs/meson.build deleted +0 -44

44 lines not on this page · raw message

subprojects/packagefiles/bilge-impl-0.2-rs/meson/meson.build new file +3 -0
new file mode 100644
index 00000000000..d8961d602e8
@@ -0,0 +1,3 @@
+extra_args += [
+  '--cfg', 'use_fallback',
+]
subprojects/packagefiles/either-1-rs/meson.build deleted +0 -26
deleted file mode 100644
index 04c96cc5fb3..00000000000
@@ -1,26 +0,0 @@
-project('either-1-rs', 'rust',
-  meson_version: '>=1.5.0',
-  version: '1.12.0',
-  license: 'MIT OR Apache-2.0',
-  default_options: [])
-
-_either_rs = static_library(
-  'either',
-  files('src/lib.rs'),
-  gnu_symbol_visibility: 'hidden',
-  override_options: ['rust_std=2018', 'build.rust_std=2018'],
-  rust_abi: 'rust',
-  rust_args: [
-    '--cap-lints', 'allow',
-    '--cfg', 'feature="use_std"',
-    '--cfg', 'feature="use_alloc"',
-  ],
-  dependencies: [],
-  native: true,
-)
-
-either_dep = declare_dependency(
-  link_with: _either_rs,
-)
-
-meson.override_dependency('either-1-rs', either_dep, native: true)
subprojects/packagefiles/foreign-0.3-rs/meson.build deleted +0 -26
deleted file mode 100644
index 0901c02c527..00000000000
@@ -1,26 +0,0 @@
-project('foreign-0.3-rs', 'rust',
-  meson_version: '>=1.5.0',
-  version: '0.2.0',
-  license: 'MIT OR Apache-2.0',
-  default_options: [])
-
-subproject('libc-0.2-rs', required: true)
-libc_rs = dependency('libc-0.2-rs')
-
-_foreign_rs = static_library(
-  'foreign',
-  files('src/lib.rs'),
-  gnu_symbol_visibility: 'hidden',
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  rust_args: [
-    '--cap-lints', 'allow',
-  ],
-  dependencies: [libc_rs],
-)
-
-foreign_dep = declare_dependency(
-  link_with: _foreign_rs,
-)
-
-meson.override_dependency('foreign-0.3-rs', foreign_dep)
subprojects/packagefiles/glib-sys-0.21-rs/meson.build deleted +0 -33
deleted file mode 100644
index 8c5483311ed..00000000000
@@ -1,33 +0,0 @@
-project('glib-sys-0.21-rs', 'rust',
-  meson_version: '>=1.5.0',
-  version: '0.21.2',
-  license: 'MIT',
-  default_options: [])
-
-subproject('libc-0.2-rs', required: true)
-libc_rs = dependency('libc-0.2-rs')
-
-_glib_sys_rs = static_library(
-  'glib_sys',
-  files('src/lib.rs'),
-  gnu_symbol_visibility: 'hidden',
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  rust_args: [
-    '--cap-lints', 'allow',
-    '--cfg', 'feature="v2_66"',
-    '--cfg', 'feature="v2_64"',
-    '--cfg', 'feature="v2_62"',
-    '--cfg', 'feature="v2_60"',
-    '--cfg', 'feature="v2_58"',
-  ],
-  # should also link with glib; don't bother doing it here since all
-  # QEMU targets have it
-  dependencies: [libc_rs],
-)
-
-glib_sys_dep = declare_dependency(
-  link_with: _glib_sys_rs,
-)
-
-meson.override_dependency('glib-sys-0.21-rs', glib_sys_dep)
subprojects/packagefiles/itertools-0.11-rs/meson.build deleted +0 -32
deleted file mode 100644
index 2a3fbe9ee5a..00000000000
@@ -1,32 +0,0 @@
-project('itertools-0.11-rs', 'rust',
-  meson_version: '>=1.5.0',
-  version: '0.11.0',
-  license: 'MIT OR Apache-2.0',
-  default_options: [])
-
-subproject('either-1-rs', required: true)
-
-either_dep = dependency('either-1-rs', native: true)
-
-_itertools_rs = static_library(
-  'itertools',
-  files('src/lib.rs'),
-  gnu_symbol_visibility: 'hidden',
-  override_options: ['rust_std=2018', 'build.rust_std=2018'],
-  rust_abi: 'rust',
-  rust_args: [
-    '--cap-lints', 'allow',
-    '--cfg', 'feature="use_std"',
-    '--cfg', 'feature="use_alloc"',
-  ],
-  dependencies: [
-    either_dep,
-  ],
-  native: true,
-)
-
-itertools_dep = declare_dependency(
-  link_with: _itertools_rs,
-)
-
-meson.override_dependency('itertools-0.11-rs', itertools_dep, native: true)
subprojects/packagefiles/libc-0.2-rs/meson.build deleted +0 -37
deleted file mode 100644
index ac4f80dba98..00000000000
@@ -1,37 +0,0 @@
-project('libc-0.2-rs', 'rust',
-  meson_version: '>=1.5.0',
-  version: '0.2.162',
-  license: 'MIT OR Apache-2.0',
-  default_options: [])
-
-_libc_rs = static_library(
-  'libc',
-  files('src/lib.rs'),
-  gnu_symbol_visibility: 'hidden',
-  override_options: ['rust_std=2015', 'build.rust_std=2015'],
-  rust_abi: 'rust',
-  rust_args: [
-    '--cap-lints', 'allow',
-    '--cfg', 'freebsd11',
-    '--cfg', 'libc_priv_mod_use',
-    '--cfg', 'libc_union',
-    '--cfg', 'libc_const_size_of',
-    '--cfg', 'libc_align',
-    '--cfg', 'libc_int128',
-    '--cfg', 'libc_core_cvoid',
-    '--cfg', 'libc_packedN',
-    '--cfg', 'libc_cfg_target_vendor',
-    '--cfg', 'libc_non_exhaustive',
-    '--cfg', 'libc_long_array',
-    '--cfg', 'libc_ptr_addr_of',
-    '--cfg', 'libc_underscore_const_names',
-    '--cfg', 'libc_const_extern_fn',
-  ],
-  dependencies: [],
-)
-
-libc_dep = declare_dependency(
-  link_with: _libc_rs,
-)
-
-meson.override_dependency('libc-0.2-rs', libc_dep)
subprojects/packagefiles/libc-0.2-rs/meson/meson.build new file +16 -0
new file mode 100644
index 00000000000..db9480ada1c
@@ -0,0 +1,16 @@
+extra_args += [
+    '--cfg', 'freebsd11',
+    '--cfg', 'libc_priv_mod_use',
+    '--cfg', 'libc_union',
+    '--cfg', 'libc_const_size_of',
+    '--cfg', 'libc_align',
+    '--cfg', 'libc_int128',
+    '--cfg', 'libc_core_cvoid',
+    '--cfg', 'libc_packedN',
+    '--cfg', 'libc_cfg_target_vendor',
+    '--cfg', 'libc_non_exhaustive',
+    '--cfg', 'libc_long_array',
+    '--cfg', 'libc_ptr_addr_of',
+    '--cfg', 'libc_underscore_const_names',
+    '--cfg', 'libc_const_extern_fn',
+]
subprojects/packagefiles/proc-macro-error-1-rs/meson.build deleted +0 -41

41 lines not on this page · raw message

subprojects/packagefiles/proc-macro-error-1-rs/meson/meson.build new file +3 -0
new file mode 100644
index 00000000000..52a244d2b16
@@ -0,0 +1,3 @@
+extra_args = [
+    '--cfg', 'use_fallback',
+]
subprojects/packagefiles/proc-macro-error-attr-1-rs/meson.build deleted +0 -31
deleted file mode 100644
index a85d7c07143..00000000000
@@ -1,31 +0,0 @@
-project('proc-macro-error-attr-1-rs', 'rust',
-  meson_version: '>=1.5.0',
-  version: '1.12.0',
-  license: 'MIT OR Apache-2.0',
-  default_options: [])
-
-subproject('proc-macro2-1-rs', required: true)
-subproject('quote-1-rs', required: true)
-
-proc_macro2_dep = dependency('proc-macro2-1-rs', native: true)
-quote_dep = dependency('quote-1-rs', native: true)
-
-rust = import('rust')
-_proc_macro_error_attr_rs = rust.proc_macro(
-  'proc_macro_error_attr',
-  files('src/lib.rs'),
-  override_options: ['rust_std=2018', 'build.rust_std=2018'],
-  rust_args: [
-    '--cap-lints', 'allow',
-  ],
-  dependencies: [
-    proc_macro2_dep,
-    quote_dep,
-  ],
-)
-
-proc_macro_error_attr_dep = declare_dependency(
-  link_with: _proc_macro_error_attr_rs,
-)
-
-meson.override_dependency('proc-macro-error-attr-1-rs', proc_macro_error_attr_dep, native: true)
subprojects/packagefiles/proc-macro-error-attr-1-rs/meson/meson.build new file +3 -0
new file mode 100644
index 00000000000..a80aee2b382
@@ -0,0 +1,3 @@
+extra_args += [
+    '--cfg', 'use_fallback',
+]
subprojects/packagefiles/proc-macro2-1-rs/meson.build deleted +0 -35
deleted file mode 100644
index ba7de070292..00000000000
@@ -1,35 +0,0 @@
-project('proc-macro2-1-rs', 'rust',
-  meson_version: '>=1.5.0',
-  version: '1.0.95',
-  license: 'MIT OR Apache-2.0',
-  default_options: [])
-
-subproject('unicode-ident-1-rs', required: true)
-
-unicode_ident_dep = dependency('unicode-ident-1-rs', native: true)
-
-_proc_macro2_rs = static_library(
-  'proc_macro2',
-  files('src/lib.rs'),
-  gnu_symbol_visibility: 'hidden',
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  rust_args: [
-    '--cap-lints', 'allow',
-    '--cfg', 'feature="proc-macro"',
-    '--cfg', 'no_literal_byte_character',
-    '--cfg', 'no_literal_c_string',
-    '--cfg', 'no_source_text',
-    '--cfg', 'wrap_proc_macro',
-  ],
-  dependencies: [
-    unicode_ident_dep,
-  ],
-  native: true,
-)
-
-proc_macro2_dep = declare_dependency(
-  link_with: _proc_macro2_rs,
-)
-
-meson.override_dependency('proc-macro2-1-rs', proc_macro2_dep, native: true)
subprojects/packagefiles/proc-macro2-1-rs/meson/meson.build new file +6 -0
new file mode 100644
index 00000000000..09712bb0b0e
@@ -0,0 +1,6 @@
+extra_args = [
+    '--cfg', 'no_literal_byte_character',
+    '--cfg', 'no_literal_c_string',
+    '--cfg', 'no_source_text',
+    '--cfg', 'wrap_proc_macro',
+]
subprojects/packagefiles/quote-1-rs/meson.build deleted +0 -31
deleted file mode 100644
index bf41fad99bb..00000000000
@@ -1,31 +0,0 @@
-project('quote-1-rs', 'rust',
-  meson_version: '>=1.5.0',
-  version: '1.12.0',
-  license: 'MIT OR Apache-2.0',
-  default_options: [])
-
-subproject('proc-macro2-1-rs', required: true)
-
-proc_macro2_dep = dependency('proc-macro2-1-rs', native: true)
-
-_quote_rs = static_library(
-  'quote',
-  files('src/lib.rs'),
-  gnu_symbol_visibility: 'hidden',
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  rust_args: [
-    '--cap-lints', 'allow',
-    '--cfg', 'feature="proc-macro"',
-  ],
-  dependencies: [
-    proc_macro2_dep,
-  ],
-  native: true,
-)
-
-quote_dep = declare_dependency(
-  link_with: _quote_rs,
-)
-
-meson.override_dependency('quote-1-rs', quote_dep, native: true)
subprojects/packagefiles/serde-1-rs/meson.build deleted +0 -36
deleted file mode 100644
index 775e0120f24..00000000000
@@ -1,36 +0,0 @@
-project('serde-1-rs', 'rust',
-  meson_version: '>=1.5.0',
-  version: '1.0.226',
-  license: 'MIT OR Apache-2.0',
-  default_options: [])
-
-subproject('serde_core-1-rs', required: true)
-subproject('serde_derive-1-rs', required: true)
-
-serde_core_dep = dependency('serde_core-1-rs')
-serde_derive_dep = dependency('serde_derive-1-rs')
-
-_serde_rs = static_library(
-  'serde',
-  files('src/lib.rs'),
-  gnu_symbol_visibility: 'hidden',
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  rust_args: [
-    '--cap-lints', 'allow',
-    '--cfg', 'feature="alloc"',
-    '--cfg', 'feature="std"',
-    '--cfg', 'feature="derive"',
-  ],
-  dependencies: [
-    serde_core_dep,
-    serde_derive_dep,
-  ]
-)
-
-serde_dep = declare_dependency(
-  link_with: _serde_rs,
-  dependencies: serde_derive_dep,
-)
-
-meson.override_dependency('serde-1-rs', serde_dep)
subprojects/packagefiles/serde_core-1-rs/meson.build deleted +0 -25
deleted file mode 100644
index 79c36f6b70e..00000000000
@@ -1,25 +0,0 @@
-project('serde_core-1-rs', 'rust',
-  meson_version: '>=1.5.0',
-  version: '1.0.226',
-  license: 'MIT OR Apache-2.0',
-  default_options: [])
-
-_serde_core_rs = static_library(
-  'serde_core',
-  files('src/lib.rs'),
-  gnu_symbol_visibility: 'hidden',
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  rust_args: [
-    '--cap-lints', 'allow',
-    '--cfg', 'feature="alloc"',
-    '--cfg', 'feature="result"',
-    '--cfg', 'feature="std"',
-  ],
-)
-
-serde_core_dep = declare_dependency(
-  link_with: _serde_core_rs,
-)
-
-meson.override_dependency('serde_core-1-rs', serde_core_dep)
subprojects/packagefiles/serde_core-1-rs/private.rs.in new file +6 -0
new file mode 100644
index 00000000000..2f8155c2a80
@@ -0,0 +1,6 @@
+#[doc(hidden)]
+pub mod __private@CARGO_PKG_VERSION_PATCH@ {
+    #[doc(hidden)]
+    pub use crate::private::*;
+}
+
subprojects/packagefiles/serde_derive-1-rs/meson.build deleted +0 -35
deleted file mode 100644
index 6c1001a844a..00000000000
@@ -1,35 +0,0 @@
-project('serde_derive-1-rs', 'rust',
-  meson_version: '>=1.5.0',
-  version: '1.0.226',
-  license: 'MIT OR Apache-2.0',
-  default_options: [])
-
-subproject('quote-1-rs', required: true)
-subproject('syn-2-rs', required: true)
-subproject('proc-macro2-1-rs', required: true)
-
-quote_dep = dependency('quote-1-rs', native: true)
-syn_dep = dependency('syn-2-rs', native: true)
-proc_macro2_dep = dependency('proc-macro2-1-rs', native: true)
-
-rust = import('rust')
-
-_serde_derive_rs = rust.proc_macro(
-  'serde_derive',
-  files('src/lib.rs'),
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_args: [
-    '--cap-lints', 'allow',
-  ],
-  dependencies: [
-    quote_dep,
-    syn_dep,
-    proc_macro2_dep,
-  ],
-)
-
-serde_derive_dep = declare_dependency(
-  link_with: _serde_derive_rs,
-)
-
-meson.override_dependency('serde_derive-1-rs', serde_derive_dep)
subprojects/packagefiles/syn-2-rs/meson.build deleted +0 -43

43 lines not on this page · raw message

subprojects/packagefiles/unicode-ident-1-rs/meson.build deleted +0 -22
deleted file mode 100644
index 11a5dab97df..00000000000
@@ -1,22 +0,0 @@
-project('unicode-ident-1-rs', 'rust',
-  meson_version: '>=1.5.0',
-  version: '1.0.12',
-  license: '(MIT OR Apache-2.0) AND Unicode-DFS-2016',
-  default_options: [])
-
-_unicode_ident_rs = static_library(
-  'unicode_ident',
-  files('src/lib.rs'),
-  gnu_symbol_visibility: 'hidden',
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  rust_args: ['--cap-lints', 'allow'],
-  dependencies: [],
-  native: true,
-)
-
-unicode_ident_dep = declare_dependency(
-  link_with: _unicode_ident_rs,
-)
-
-meson.override_dependency('unicode-ident-1-rs', unicode_ident_dep, native: true)
subprojects/probe-0.5-rs.wrap +0 -1
index bd23c0ea789..035da86c46a 100644
@@ -4,7 +4,6 @@ source_url = https://crates.io/api/v1/crates/probe/0.5.2/download
 source_filename = probe-0.5.2.tar.gz
 source_hash = 136558b6e1ebaecc92755d0ffaf9421f519531bed30cc2ad23b22cb00965cc5e
 method = cargo
-patch_directory = probe-0.5-rs
 
 # bump this version number on every change to meson.build or the patches:
 # v1
subprojects/quote-1-rs.wrap +0 -1
index dab58490a4f..80d5ea84f54 100644
@@ -4,7 +4,6 @@ source_url = https://crates.io/api/v1/crates/quote/1.0.36/download
 source_filename = quote-1.0.36.0.tar.gz
 source_hash = 0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7
 method = cargo
-patch_directory = quote-1-rs
 
 # bump this version number on every change to meson.build or the patches:
 # v3
subprojects/serde-1-rs.wrap +0 -1
index 9792592d480..801f11efd1f 100644
@@ -5,7 +5,6 @@ source_filename = serde-1.0.226.0.tar.gz
 source_hash = 0dca6411025b24b60bfa7ec1fe1f8e710ac09782dca409ee8237ba74b51295fd
 method = cargo
 diff_files = serde-1.0.226-include.patch
-patch_directory = serde-1-rs
 
 # bump this version number on every change to meson.build or the patches:
 # v2
subprojects/serde_core-1-rs.wrap +0 -1
index ff2e59430b1..6c2919871e1 100644
@@ -5,7 +5,6 @@ source_filename = serde_core-1.0.226.0.tar.gz
 source_hash = ba2ba63999edb9dac981fb34b3e5c0d111a69b0924e253ed29d83f7c99e966a4
 method = cargo
 diff_files = serde_core-1.0.226-include.patch
-patch_directory = serde_core-1-rs
 
 # bump this version number on every change to meson.build or the patches:
 # v2
subprojects/serde_derive-1-rs.wrap +0 -1
index ed345a7f840..9fb96c5e336 100644
@@ -5,7 +5,6 @@ source_filename = serde_derive-1.0.226.0.tar.gz
 source_hash = 8db53ae22f34573731bafa1db20f04027b2d25e02d8205921b569171699cdb33
 method = cargo
 diff_files = serde_derive-1.0.226-include.patch
-patch_directory = serde_derive-1-rs
 
 # bump this version number on every change to meson.build or the patches:
 # v2
subprojects/syn-2-rs.wrap +0 -1
index 4b545c7980c..8ec7fd00528 100644
@@ -4,7 +4,6 @@ source_url = https://crates.io/api/v1/crates/syn/2.0.104/download
 source_filename = syn-2.0.104.0.tar.gz
 source_hash = 17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40
 method = cargo
-patch_directory = syn-2-rs
 
 # bump this version number on every change to meson.build or the patches:
 # v3
subprojects/unicode-ident-1-rs.wrap +0 -1
index 0a5e097953e..0495b3912f1 100644
@@ -4,7 +4,6 @@ source_url = https://crates.io/api/v1/crates/unicode-ident/1.0.12/download
 source_filename = unicode-ident-1.0.12.tar.gz
 source_hash = 3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b
 method = cargo
-patch_directory = unicode-ident-1-rs
 
 # bump this version number on every change to meson.build or the patches:
 # v3
Signature · 1 line
2.54.0
#4 lore raw

PATCH 4/6 rust: remove unnecessary wrap files

In reply to Paolo Bonzini

Meson can also figure out what the content of the wrap file would be, at least if there is no diff file. So delete the now-unnecessary wrap configurations.

---
 subprojects/anyhow-1-rs.wrap                | 10 ----------
 subprojects/arbitrary-int-1-rs.wrap         |  9 ---------
 subprojects/attrs-0.2-rs.wrap               |  9 ---------
 subprojects/bilge-0.2-rs.wrap               |  9 ---------
 subprojects/bilge-impl-0.2-rs.wrap          | 10 ----------
 subprojects/either-1-rs.wrap                |  9 ---------
 subprojects/foreign-0.3-rs.wrap             |  9 ---------
 subprojects/glib-sys-0.21-rs.wrap           |  9 ---------
 subprojects/itertools-0.11-rs.wrap          |  9 ---------
 subprojects/libc-0.2-rs.wrap                |  7 -------
 subprojects/probe-0.5-rs.wrap               |  9 ---------
 subprojects/proc-macro-error-1-rs.wrap      | 10 ----------
 subprojects/proc-macro-error-attr-1-rs.wrap | 10 ----------
 subprojects/proc-macro2-1-rs.wrap           | 10 ----------
 subprojects/quote-1-rs.wrap                 |  9 ---------
 subprojects/syn-2-rs.wrap                   |  9 ---------
 subprojects/unicode-ident-1-rs.wrap         |  9 ---------
 17 files changed, 156 deletions(-)
 delete mode 100644 subprojects/anyhow-1-rs.wrap
 delete mode 100644 subprojects/arbitrary-int-1-rs.wrap
 delete mode 100644 subprojects/attrs-0.2-rs.wrap
 delete mode 100644 subprojects/bilge-0.2-rs.wrap
 delete mode 100644 subprojects/bilge-impl-0.2-rs.wrap
 delete mode 100644 subprojects/either-1-rs.wrap
 delete mode 100644 subprojects/foreign-0.3-rs.wrap
 delete mode 100644 subprojects/glib-sys-0.21-rs.wrap
 delete mode 100644 subprojects/itertools-0.11-rs.wrap
 delete mode 100644 subprojects/libc-0.2-rs.wrap
 delete mode 100644 subprojects/probe-0.5-rs.wrap
 delete mode 100644 subprojects/proc-macro-error-1-rs.wrap
 delete mode 100644 subprojects/proc-macro-error-attr-1-rs.wrap
 delete mode 100644 subprojects/proc-macro2-1-rs.wrap
 delete mode 100644 subprojects/quote-1-rs.wrap
 delete mode 100644 subprojects/syn-2-rs.wrap
 delete mode 100644 subprojects/unicode-ident-1-rs.wrap
subprojects/anyhow-1-rs.wrap deleted +0 -10
deleted file mode 100644
index 132c70c467e..00000000000
@@ -1,10 +0,0 @@
-[wrap-file]
-directory = anyhow-1.0.98
-source_url = https://crates.io/api/v1/crates/anyhow/1.0.98/download
-source_filename = anyhow-1.0.98.tar.gz
-source_hash = e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487
-method = cargo
-patch_directory = anyhow-1-rs
-
-# bump this version number on every change to meson.build or the patches:
-# v2
subprojects/arbitrary-int-1-rs.wrap deleted +0 -9
deleted file mode 100644
index 5cf4b11e4a3..00000000000
@@ -1,9 +0,0 @@
-[wrap-file]
-directory = arbitrary-int-1.2.7
-source_url = https://crates.io/api/v1/crates/arbitrary-int/1.2.7/download
-source_filename = arbitrary-int-1.2.7.tar.gz
-source_hash = c84fc003e338a6f69fbd4f7fe9f92b535ff13e9af8997f3b14b6ddff8b1df46d
-method = cargo
-
-# bump this version number on every change to meson.build or the patches:
-# v2
subprojects/attrs-0.2-rs.wrap deleted +0 -9
deleted file mode 100644
index dcdddf005f6..00000000000
@@ -1,9 +0,0 @@
-[wrap-file]
-directory = attrs-0.2.9
-source_url = https://crates.io/api/v1/crates/attrs/0.2.9/download
-source_filename = attrs-0.2.9.tar.gz
-source_hash = 2a207d40f43de65285f3de0509bb6cb16bc46098864fce957122bbacce327e5f
-method = cargo
-
-# bump this version number on every change to meson.build or the patches:
-# v2
subprojects/bilge-0.2-rs.wrap deleted +0 -9
deleted file mode 100644
index cff10f6710d..00000000000
@@ -1,9 +0,0 @@
-[wrap-file]
-directory = bilge-0.2.0
-source_url = https://crates.io/api/v1/crates/bilge/0.2.0/download
-source_filename = bilge-0.2.0.tar.gz
-source_hash = dc707ed8ebf81de5cd6c7f48f54b4c8621760926cdf35a57000747c512e67b57
-method = cargo
-
-# bump this version number on every change to meson.build or the patches:
-# v2
subprojects/bilge-impl-0.2-rs.wrap deleted +0 -10
deleted file mode 100644
index e423b6cec66..00000000000
@@ -1,10 +0,0 @@
-[wrap-file]
-directory = bilge-impl-0.2.0
-source_url = https://crates.io/api/v1/crates/bilge-impl/0.2.0/download
-source_filename = bilge-impl-0.2.0.tar.gz
-source_hash = feb11e002038ad243af39c2068c8a72bcf147acf05025dcdb916fcc000adb2d8
-method = cargo
-patch_directory = bilge-impl-0.2-rs
-
-# bump this version number on every change to meson.build or the patches:
-# v3
subprojects/either-1-rs.wrap deleted +0 -9
deleted file mode 100644
index d2808d3d7fb..00000000000
@@ -1,9 +0,0 @@
-[wrap-file]
-directory = either-1.12.0
-source_url = https://crates.io/api/v1/crates/either/1.12.0/download
-source_filename = either-1.12.0.tar.gz
-source_hash = 3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b
-method = cargo
-
-# bump this version number on every change to meson.build or the patches:
-# v3
subprojects/foreign-0.3-rs.wrap deleted +0 -9
deleted file mode 100644
index e4aa7f11fc0..00000000000
@@ -1,9 +0,0 @@
-[wrap-file]
-directory = foreign-0.3.1
-source_url = https://crates.io/api/v1/crates/foreign/0.3.1/download
-source_filename = foreign-0.3.1.tar.gz
-source_hash = 17ca1b5be8c9d320daf386f1809c7acc0cb09accbae795c2001953fa50585846
-method = cargo
-
-# bump this version number on every change to meson.build or the patches:
-# v2
subprojects/glib-sys-0.21-rs.wrap deleted +0 -9
deleted file mode 100644
index 4723f7f63be..00000000000
@@ -1,9 +0,0 @@
-[wrap-file]
-directory = glib-sys-0.21.2
-source_url = https://crates.io/api/v1/crates/glib-sys/0.21.2/download
-source_filename = glib-sys-0.21.2.tar.gz
-source_hash = d09d3d0fddf7239521674e57b0465dfbd844632fec54f059f7f56112e3f927e1
-method = cargo
-
-# bump this version number on every change to meson.build or the patches:
-# v2
subprojects/itertools-0.11-rs.wrap deleted +0 -9
deleted file mode 100644
index fc63e2f57d9..00000000000
@@ -1,9 +0,0 @@
-[wrap-file]
-directory = itertools-0.11.0
-source_url = https://crates.io/api/v1/crates/itertools/0.11.0/download
-source_filename = itertools-0.11.0.tar.gz
-source_hash = b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57
-method = cargo
-
-# bump this version number on every change to meson.build or the patches:
-# v3
subprojects/libc-0.2-rs.wrap deleted +0 -7
deleted file mode 100644
index 488330178ed..00000000000
@@ -1,7 +0,0 @@
-[wrap-file]
-directory = libc-0.2.162
-source_url = https://crates.io/api/v1/crates/libc/0.2.162/download
-source_filename = libc-0.2.162.tar.gz
-source_hash = 18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398
-method = cargo
-patch_directory = libc-0.2-rs
subprojects/probe-0.5-rs.wrap deleted +0 -9
deleted file mode 100644
index 035da86c46a..00000000000
@@ -1,9 +0,0 @@
-[wrap-file]
-directory = probe-0.5.2
-source_url = https://crates.io/api/v1/crates/probe/0.5.2/download
-source_filename = probe-0.5.2.tar.gz
-source_hash = 136558b6e1ebaecc92755d0ffaf9421f519531bed30cc2ad23b22cb00965cc5e
-method = cargo
-
-# bump this version number on every change to meson.build or the patches:
-# v1
subprojects/proc-macro-error-1-rs.wrap deleted +0 -10
deleted file mode 100644
index e57921bfadc..00000000000
@@ -1,10 +0,0 @@
-[wrap-file]
-directory = proc-macro-error-1.0.4
-source_url = https://crates.io/api/v1/crates/proc-macro-error/1.0.4/download
-source_filename = proc-macro-error-1.0.4.tar.gz
-source_hash = da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c
-method = cargo
-patch_directory = proc-macro-error-1-rs
-
-# bump this version number on every change to meson.build or the patches:
-# v3
subprojects/proc-macro-error-attr-1-rs.wrap deleted +0 -10
deleted file mode 100644
index 02d18f3393d..00000000000
@@ -1,10 +0,0 @@
-[wrap-file]
-directory = proc-macro-error-attr-1.0.4
-source_url = https://crates.io/api/v1/crates/proc-macro-error-attr/1.0.4/download
-source_filename = proc-macro-error-attr-1.0.4.tar.gz
-source_hash = a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869
-method = cargo
-patch_directory = proc-macro-error-attr-1-rs
-
-# bump this version number on every change to meson.build or the patches:
-# v3
subprojects/proc-macro2-1-rs.wrap deleted +0 -10
deleted file mode 100644
index 676d1a3a8ca..00000000000
@@ -1,10 +0,0 @@
-[wrap-file]
-directory = proc-macro2-1.0.95
-source_url = https://crates.io/api/v1/crates/proc-macro2/1.0.95/download
-source_filename = proc-macro2-1.0.95.0.tar.gz
-source_hash = 02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778
-method = cargo
-patch_directory = proc-macro2-1-rs
-
-# bump this version number on every change to meson.build or the patches:
-# v3
subprojects/quote-1-rs.wrap deleted +0 -9
deleted file mode 100644
index 80d5ea84f54..00000000000
@@ -1,9 +0,0 @@
-[wrap-file]
-directory = quote-1.0.36
-source_url = https://crates.io/api/v1/crates/quote/1.0.36/download
-source_filename = quote-1.0.36.0.tar.gz
-source_hash = 0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7
-method = cargo
-
-# bump this version number on every change to meson.build or the patches:
-# v3
subprojects/syn-2-rs.wrap deleted +0 -9
deleted file mode 100644
index 8ec7fd00528..00000000000
@@ -1,9 +0,0 @@
-[wrap-file]
-directory = syn-2.0.104
-source_url = https://crates.io/api/v1/crates/syn/2.0.104/download
-source_filename = syn-2.0.104.0.tar.gz
-source_hash = 17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40
-method = cargo
-
-# bump this version number on every change to meson.build or the patches:
-# v3
subprojects/unicode-ident-1-rs.wrap deleted +0 -9
deleted file mode 100644
index 0495b3912f1..00000000000
@@ -1,9 +0,0 @@
-[wrap-file]
-directory = unicode-ident-1.0.12
-source_url = https://crates.io/api/v1/crates/unicode-ident/1.0.12/download
-source_filename = unicode-ident-1.0.12.tar.gz
-source_hash = 3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b
-method = cargo
-
-# bump this version number on every change to meson.build or the patches:
-# v3
Signature · 1 line
2.54.0
#5 lore raw

PATCH 5/6 rust: use meson automatic parsing of Cargo.toml

In reply to Paolo Bonzini

Finally, automatic parsing of Cargo.toml is also possible for QEMU's own crates, not just for subprojects. This removes the need to list the dependencies and language editions in both Cargo.toml and meson.build files.

---
 meson.build                             |  7 +------
 rust/bindings/chardev-sys/meson.build   | 11 ++++-------
 rust/bindings/hwcore-sys/meson.build    | 11 ++++-------
 rust/bindings/migration-sys/meson.build | 11 ++++-------
 rust/bindings/qom-sys/meson.build       | 11 ++++-------
 rust/bindings/system-sys/meson.build    | 11 ++++-------
 rust/bindings/util-sys/meson.build      | 11 ++++-------
 rust/bits/meson.build                   |  7 ++-----
 rust/bql/meson.build                    | 13 +++----------
 rust/chardev/meson.build                |  8 ++------
 rust/common/meson.build                 | 10 +++-------
 rust/hw/char/pl011/meson.build          | 22 +---------------------
 rust/hw/core/meson.build                | 10 ++--------
 rust/hw/timer/hpet/meson.build          | 17 +----------------
 rust/meson.build                        | 13 ++-----------
 rust/migration/meson.build              |  8 ++------
 rust/qemu-macros/meson.build            | 12 ++----------
 rust/qom/meson.build                    |  8 ++------
 rust/system/meson.build                 |  8 ++------
 rust/trace/meson.build                  |  9 +++------
 rust/util/meson.build                   |  7 ++-----
 21 files changed, 54 insertions(+), 171 deletions(-)
meson.build +1 -6
index 91d74fa198c..17c8751f92d 100644
@@ -134,12 +134,7 @@ if have_rust
 
   rustfmt = find_program('rustfmt', required: false)
 
-  rustc_lint_args = run_command(rustc_args, '--lints',
-     capture: true, check: true).stdout().strip().splitlines()
-  if get_option('strict_rust_lints')
-    rustc_lint_args += ['-Dwarnings', '-Funknown_lints']
-  endif
-
+  rustc_lint_args = get_option('strict_rust_lints') ?  ['-Dwarnings', '-Funknown_lints'] : []
   add_project_arguments(rustc_lint_args + ['--cfg', 'MESON'],
       native: false, language: 'rust')
   add_project_arguments(rustc_lint_args + ['--cfg', 'MESON'],
rust/bindings/chardev-sys/meson.build +4 -7
index 458075b8060..7af5d74dd51 100644
@@ -1,12 +1,9 @@
 _bindgen_chardev_rs = rust.bindgen(
   args: bindgen_args_common + bindgen_args_data['chardev-sys'].split(),
   kwargs: bindgen_kwargs)
-_chardev_sys_rs = static_library(
-  'chardev_sys',
-  structured_sources(['lib.rs', _bindgen_chardev_rs]),
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  dependencies: [glib_sys_rs, common_rs, qom_sys_rs, util_sys_rs],
-)
+
+_chardev_sys_rs = cargo_ws.package('chardev-sys').library(
+  structured_sources(['lib.rs', _bindgen_chardev_rs]))
+cargo_ws.package('chardev-sys').override_dependency(declare_dependency(link_with: _chardev_sys_rs))
 
 chardev_sys_rs = declare_dependency(link_with: [_chardev_sys_rs])
rust/bindings/hwcore-sys/meson.build +4 -7
index 3d51947b4a4..6b8d218f691 100644
@@ -1,12 +1,9 @@
 _bindgen_hwcore_rs = rust.bindgen(
   args: bindgen_args_common + bindgen_args_data['hwcore-sys'].split(),
   kwargs: bindgen_kwargs)
-_hwcore_sys_rs = static_library(
-  'hwcore_sys',
-  structured_sources(['lib.rs', _bindgen_hwcore_rs]),
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  dependencies: [common_rs, glib_sys_rs, qom_sys_rs, util_sys_rs, migration_sys_rs, chardev_sys_rs],
-)
+
+_hwcore_sys_rs = cargo_ws.package('hwcore-sys').library(
+  structured_sources(['lib.rs', _bindgen_hwcore_rs]))
+cargo_ws.package('hwcore-sys').override_dependency(declare_dependency(link_with: _hwcore_sys_rs))
 
 hwcore_sys_rs = declare_dependency(link_with: [_hwcore_sys_rs])
rust/bindings/migration-sys/meson.build +4 -7
index 9243acba300..91f2967c9b3 100644
@@ -1,12 +1,9 @@
 _bindgen_migration_rs = rust.bindgen(
   args: bindgen_args_common + bindgen_args_data['migration-sys'].split(),
   kwargs: bindgen_kwargs)
-_migration_sys_rs = static_library(
-  'migration_sys',
-  structured_sources(['lib.rs', _bindgen_migration_rs]),
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  dependencies: [glib_sys_rs, common_rs, util_sys_rs],
-)
+
+_migration_sys_rs = cargo_ws.package('migration-sys').library(
+  structured_sources(['lib.rs', _bindgen_migration_rs]))
+cargo_ws.package('migration-sys').override_dependency(declare_dependency(link_with: _migration_sys_rs))
 
 migration_sys_rs = declare_dependency(link_with: [_migration_sys_rs])
rust/bindings/qom-sys/meson.build +4 -7
index 8f8ae7d1bc8..540e55eea88 100644
@@ -1,12 +1,9 @@
 _bindgen_qom_rs = rust.bindgen(
   args: bindgen_args_common + bindgen_args_data['qom-sys'].split(),
   kwargs: bindgen_kwargs)
-_qom_sys_rs = static_library(
-  'qom_sys',
-  structured_sources(['lib.rs', _bindgen_qom_rs]),
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  dependencies: [glib_sys_rs, util_sys_rs],
-)
+
+_qom_sys_rs = cargo_ws.package('qom-sys').library(
+  structured_sources(['lib.rs', _bindgen_qom_rs]))
+cargo_ws.package('qom-sys').override_dependency(declare_dependency(link_with: _qom_sys_rs))
 
 qom_sys_rs = declare_dependency(link_with: [_qom_sys_rs])
rust/bindings/system-sys/meson.build +4 -7
index aa5e8801149..b1f4770499c 100644
@@ -1,12 +1,9 @@
 _bindgen_system_rs = rust.bindgen(
   args: bindgen_args_common + bindgen_args_data['system-sys'].split(),
   kwargs: bindgen_kwargs)
-_system_sys_rs = static_library(
-  'system_sys',
-  structured_sources(['lib.rs', _bindgen_system_rs]),
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  dependencies: [common_rs, glib_sys_rs, hwcore_sys_rs, migration_sys_rs, qom_sys_rs, util_sys_rs],
-)
+
+_system_sys_rs = cargo_ws.package('system-sys').library(
+  structured_sources(['lib.rs', _bindgen_system_rs]))
+cargo_ws.package('system-sys').override_dependency(declare_dependency(link_with: _system_sys_rs))
 
 system_sys_rs = declare_dependency(link_with: [_system_sys_rs])
rust/bindings/util-sys/meson.build +4 -7
index c37f50a94bd..5a9db6152e1 100644
@@ -1,12 +1,9 @@
 _bindgen_util_rs = rust.bindgen(
   args: bindgen_args_common + bindgen_args_data['util-sys'].split(),
   kwargs: bindgen_kwargs)
-_util_sys_rs = static_library(
-  'util_sys',
-  structured_sources(['lib.rs', _bindgen_util_rs]),
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  dependencies: [glib_sys_rs],
-)
+
+_util_sys_rs = cargo_ws.package('util-sys').library(
+  structured_sources(['lib.rs', _bindgen_util_rs]))
+cargo_ws.package('util-sys').override_dependency(declare_dependency(link_with: _util_sys_rs))
 
 util_sys_rs = declare_dependency(link_with: [_util_sys_rs])
rust/bits/meson.build +2 -5
index c0094ffcf38..c64a17ba154 100644
@@ -1,8 +1,5 @@
-_bits_rs = static_library(
-  'bits',
-  'src/lib.rs',
-  dependencies: [qemu_macros],
-)
+_bits_rs = cargo_ws.package('bits').library()
+cargo_ws.package('bits').override_dependency(declare_dependency(link_with: _bits_rs))
 
 bits_rs = declare_dependency(link_with: _bits_rs)
 
rust/bql/meson.build +3 -10
index de295d2983e..8bdc9b53a2c 100644
@@ -1,17 +1,10 @@
-_bql_cfg = run_command(rustc_args,
-  '--config-headers', config_host_h, '--features', files('Cargo.toml'),
-  capture: true, check: true).stdout().strip().splitlines()
-
+_bql_cfg = []
 if get_option('debug_mutex')
   _bql_cfg += ['--cfg', 'feature="debug_cell"']
 endif
 
-_bql_rs = static_library(
-  'bql',
-  'src/lib.rs',
-  rust_args: _bql_cfg,
-  dependencies: [glib_sys_rs, util_sys_rs],
-)
+_bql_rs = cargo_ws.package('bql').library(rust_args: _bql_cfg)
+cargo_ws.package('bql').override_dependency(declare_dependency(link_with: _bql_rs))
 
 bql_rs = declare_dependency(link_with: [_bql_rs],
   dependencies: [qemuutil])
rust/chardev/meson.build +2 -6
index 7b267fd23ae..f3462e9209e 100644
@@ -1,8 +1,4 @@
-_chardev_rs = static_library(
-  'chardev',
-  'src/lib.rs',
-  link_with: [_bql_rs, _migration_rs, _qom_rs, _util_rs],
-  dependencies: [glib_sys_rs, common_rs, qemu_macros, chardev_sys_rs],
-)
+_chardev_rs = cargo_ws.package('chardev').library()
+cargo_ws.package('chardev').override_dependency(declare_dependency(link_with: _chardev_rs))
 
 chardev_rs = declare_dependency(link_with: [_chardev_rs], dependencies: [chardev, qemuutil])
rust/common/meson.build +3 -7
index 57091b18fc4..43afe417dcd 100644
@@ -1,13 +1,9 @@
 _common_cfg = run_command(rustc_args,
-  '--config-headers', config_host_h, '--features', files('Cargo.toml'),
+  '--config-headers', config_host_h, files('Cargo.toml'),
   capture: true, check: true).stdout().strip().splitlines()
 
-_common_rs = static_library(
-  'common',
-  'src/lib.rs',
-  rust_args: _common_cfg,
-  dependencies: [libc_rs, qemu_macros],
-)
+_common_rs = cargo_ws.package('common').library(rust_args: _common_cfg)
+cargo_ws.package('common').override_dependency(declare_dependency(link_with: _common_rs))
 
 common_rs = declare_dependency(link_with: [_common_rs])
 
rust/hw/char/pl011/meson.build +1 -21
index 1a1a09e5083..92b7d375f75 100644
@@ -8,8 +8,7 @@ _libpl011_bindings_inc_rs = rust.bindgen(
   kwargs: bindgen_kwargs,
 )
 
-_libpl011_rs = static_library(
-  'pl011',
+_libpl011_rs = cargo_ws.package('pl011').library(
   structured_sources(
     [
       'src/lib.rs',
@@ -19,25 +18,6 @@ _libpl011_rs = static_library(
     ],
     {'.' : _libpl011_bindings_inc_rs},
   ),
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  link_with: [
-    _util_rs,
-    _migration_rs,
-    _bql_rs,
-    _qom_rs,
-    _chardev_rs,
-    _system_rs,
-    _hwcore_rs,
-    _trace_rs
-  ],
-  dependencies: [
-    bilge_rs,
-    bilge_impl_rs,
-    bits_rs,
-    common_rs,
-    glib_sys_rs,
-  ],
 )
 
 rust_devices_ss.add(when: 'CONFIG_X_PL011_RUST', if_true: [declare_dependency(
rust/hw/core/meson.build +2 -8
index 6d1bfd4d204..da0f13d3149 100644
@@ -1,11 +1,5 @@
-_hwcore_rs = static_library(
-  'hwcore',
-  'src/lib.rs',
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  link_with: [_bql_rs, _chardev_rs, _migration_rs, _qom_rs, _util_rs],
-  dependencies: [glib_sys_rs, qemu_macros, common_rs, hwcore_sys_rs],
-)
+_hwcore_rs = cargo_ws.package('hwcore').library()
+cargo_ws.package('hwcore').override_dependency(declare_dependency(link_with: _hwcore_rs))
 
 hwcore_rs = declare_dependency(link_with: [_hwcore_rs],
   dependencies: [qom_rs, hwcore])
rust/hw/timer/hpet/meson.build +1 -16
index 3bb7ce2a6ca..419e8f40b70 100644
@@ -1,19 +1,4 @@
-_libhpet_rs = static_library(
-  'hpet',
-  files('src/lib.rs'),
-  override_options: ['rust_std=2021', 'build.rust_std=2021'],
-  rust_abi: 'rust',
-  link_with: [
-    _util_rs,
-    _migration_rs,
-    _bql_rs,
-    _qom_rs,
-    _system_rs,
-    _hwcore_rs,
-    _trace_rs,
-  ],
-  dependencies: [common_rs],
-)
+_libhpet_rs = cargo_ws.package('hpet').library()
 
 rust_devices_ss.add(when: 'CONFIG_X_HPET_RUST', if_true: [declare_dependency(
   link_whole: [_libhpet_rs],
rust/meson.build +2 -11
index d580c7cbeef..266c2add358 100644
@@ -5,19 +5,10 @@ else
 endif
 
 cargo_ws = import('rust').workspace()
-anyhow_rs = cargo_ws.subproject('anyhow').dependency()
-bilge_rs = cargo_ws.subproject('bilge').dependency()
-bilge_impl_rs = cargo_ws.subproject('bilge-impl').dependency()
-foreign_rs = cargo_ws.subproject('foreign').dependency()
-glib_sys_rs = cargo_ws.subproject('glib-sys').dependency()
-libc_rs = cargo_ws.subproject('libc').dependency()
-probe_rs = cargo_ws.subproject('probe').dependency()
+
+# used by QAPI tests, which are still not handled via cargo_ws
 serde_rs = cargo_ws.subproject('serde').dependency()
 serde_derive_rs = cargo_ws.subproject('serde_derive').dependency()
-quote_rs_native = cargo_ws.subproject('quote').dependency()
-syn_rs_native = cargo_ws.subproject('syn').dependency()
-proc_macro2_rs_native = cargo_ws.subproject('proc-macro2').dependency()
-attrs_rs_native = cargo_ws.subproject('attrs').dependency()
 
 genrs = []
 
rust/migration/meson.build +2 -6
index 96266897770..b9ba82989e3 100644
@@ -1,9 +1,5 @@
-_migration_rs = static_library(
-  'migration',
-  'src/lib.rs',
-  link_with: [_util_rs, _bql_rs],
-  dependencies: [common_rs, glib_sys_rs, qemu_macros, migration_sys_rs],
-)
+_migration_rs = cargo_ws.package('migration').library()
+cargo_ws.package('migration').override_dependency(declare_dependency(link_with: _migration_rs))
 
 migration_rs = declare_dependency(link_with: [_migration_rs],
   dependencies: [bql_rs, migration, qemuutil])
rust/qemu-macros/meson.build +2 -10
index cdea5bf439e..7b25ccefe35 100644
@@ -1,13 +1,5 @@
-_qemu_macros_rs = rust.proc_macro(
-  'qemu_macros',
-  files('src/lib.rs'),
-  dependencies: [
-    attrs_rs_native,
-    proc_macro2_rs_native,
-    quote_rs_native,
-    syn_rs_native,
-  ],
-)
+_qemu_macros_rs = cargo_ws.package('qemu_macros').proc_macro()
+cargo_ws.package('qemu_macros').override_dependency(declare_dependency(link_with: _qemu_macros_rs))
 
 qemu_macros = declare_dependency(
   link_with: _qemu_macros_rs,
rust/qom/meson.build +2 -6
index 9865da280cf..6736cfb24c2 100644
@@ -1,9 +1,5 @@
-_qom_rs = static_library(
-  'qom',
-  'src/lib.rs',
-  link_with: [_bql_rs, _migration_rs],
-  dependencies: [common_rs, glib_sys_rs, qemu_macros, qom_sys_rs],
-)
+_qom_rs = cargo_ws.package('qom').library()
+cargo_ws.package('qom').override_dependency(declare_dependency(link_with: _qom_rs))
 
 qom_rs = declare_dependency(link_with: [_qom_rs], dependencies: [qemu_macros, qom, qemuutil])
 
rust/system/meson.build +2 -6
index 89c1f2b84d1..b1edcd6bbe7 100644
@@ -1,9 +1,5 @@
-_system_rs = static_library(
-  'system',
-  'src/lib.rs',
-  link_with: [_bql_rs, _hwcore_rs, _migration_rs, _qom_rs, _util_rs],
-  dependencies: [glib_sys_rs, common_rs, qemu_macros, system_sys_rs],
-)
+_system_rs = cargo_ws.package('system').library()
+cargo_ws.package('system').override_dependency(declare_dependency(link_with: _system_rs))
 
 system_rs = declare_dependency(link_with: [_system_rs],
   dependencies: [hwcore])
rust/trace/meson.build +3 -6
index 0071a49cf72..b049f73b542 100644
@@ -7,11 +7,8 @@ lib_rs = configure_file(
     'MESON_BUILD_ROOT': meson.project_build_root(),
   })
 
-_trace_rs = static_library(
-  'trace',             # Library name,
-  lib_rs,
-  trace_rs_targets,         # List of generated `.rs` custom targets
-  dependencies: [libc_rs, probe_rs],
-)
+_trace_rs = cargo_ws.package('trace').library(
+  structured_sources([lib_rs, trace_rs_targets]))
+cargo_ws.package('trace').override_dependency(declare_dependency(link_with: _trace_rs))
 
 trace_rs = declare_dependency(link_with: _trace_rs)
rust/util/meson.build +2 -5
index 3edd8245bfc..427427f1915 100644
@@ -1,8 +1,5 @@
-_util_rs = static_library(
-  'util',
-  'src/lib.rs',
-  dependencies: [anyhow_rs, libc_rs, foreign_rs, glib_sys_rs, common_rs, serde_rs, util_sys_rs],
-)
+_util_rs = cargo_ws.package('util').library()
+cargo_ws.package('util').override_dependency(declare_dependency(link_with: _util_rs))
 
 util_rs = declare_dependency(link_with: [_util_rs], dependencies: [qemuutil, qom])
 
Signature · 1 line
2.54.0
#6 lore raw

PATCH 6/6 scripts: remove now dead parts of rustc_args.py

In reply to Paolo Bonzini

The logic to parse the [lints] section has been integrated into Meson and can be removed.

---
 meson.build                |  1 -
 scripts/rust/rustc_args.py | 80 +-------------------------------------
 2 files changed, 1 insertion(+), 80 deletions(-)
meson.build +0 -1
index 17c8751f92d..999350a8b50 100644
@@ -129,7 +129,6 @@ endif
 
 if have_rust
   rustc_args = [find_program('scripts/rust/rustc_args.py'),
-    '--rustc-version', rustc.version(),
     '--workspace', meson.project_source_root()]
 
   rustfmt = find_program('rustfmt', required: false)
scripts/rust/rustc_args.py +1 -79

112 lines not on this page · raw message

Signature · 1 line
2.54.0
#7 lore raw
In reply to Paolo Bonzini
Quoted 29 lines · Paolo Bonzini

These are relatively old patches, but it's time to post them now that the light is visible at the end of the Meson tunnel.

Meson 1.11.x greatly increased the ability to parse Cargo.toml and automatically build complete targets out of the information in there---this was more or less always the intention when Manos decided to build Rust crates with Meson, but it took some time to get there.

It still does not support cross compiling, but that should be added in 1.12.0 and should be completely transparent, so it is already possible to post patches for the final shape of the Meson rules.

With this change, it is possible to have a much more compact description of Rust devices in meson.build, compared to what was used before:

_libhpet_rs = cargo_ws.package('hpet').library() rust_devices_ss.add(when: 'CONFIG_X_HPET_RUST', if_true: [declare_dependency(

    link_whole: [_libhpet_rs],
    variables: {'crate': 'hpet'},

)])

For a description of Cargo support in Meson see
https://mesonbuild.com/Rust.html
and https://mesonbuild.com/Rust-module.html#workspace.

Paolo

Quoted 7 lines

Paolo Bonzini (6):
meson: use compiler_target() to get rustc target
rust: switch to cargo subprojects
rust: switch to autogenerated meson rules
rust: remove unnecessary wrap files
rust: use meson automatic parsing of Cargo.toml
scripts: remove now dead parts of rustc_args.py

Missing patch to update minimum meson version check in configure (it's hardcoded to 1.10.0)?

Quoted 124 lines
 configure                                     |  3 -
 meson.build                                   | 13 +--
 rust/Cargo.lock => Cargo.lock                 |  0
 rust/Cargo.toml => Cargo.toml                 |  6 +-
 rust/bindings/chardev-sys/meson.build         | 11 +--
 rust/bindings/hwcore-sys/meson.build          | 11 +--
 rust/bindings/migration-sys/meson.build       | 11 +--
 rust/bindings/qom-sys/meson.build             | 11 +--
 rust/bindings/system-sys/meson.build          | 11 +--
 rust/bindings/util-sys/meson.build            | 11 +--
 rust/bits/meson.build                         |  7 +-
 rust/bql/meson.build                          | 13 +--
 rust/chardev/meson.build                      |  8 +-
 rust/common/meson.build                       | 10 +--
 rust/hw/char/pl011/meson.build                | 22 +----
 rust/hw/core/meson.build                      | 10 +--
 rust/hw/timer/hpet/meson.build                | 17 +---
 rust/meson.build                              | 32 +-------
 rust/migration/meson.build                    |  8 +-
 rust/qemu-macros/meson.build                  | 12 +--
 rust/qom/meson.build                          |  8 +-
 rust/system/meson.build                       |  8 +-
 rust/trace/meson.build                        |  9 +--
 rust/util/meson.build                         |  7 +-
 scripts/qapi/rs_types.py                      |  2 +-
 scripts/rust/rustc_args.py                    | 80 +------------------
 subprojects/anyhow-1-rs.wrap                  |  7 --
 subprojects/arbitrary-int-1-rs.wrap           | 10 ---
 subprojects/attrs-0.2-rs.wrap                 |  7 --
 subprojects/bilge-0.2-rs.wrap                 | 10 ---
 subprojects/bilge-impl-0.2-rs.wrap            | 10 ---
 subprojects/either-1-rs.wrap                  | 10 ---
 subprojects/foreign-0.3-rs.wrap               |  7 --
 subprojects/glib-sys-0.21-rs.wrap             |  7 --
 subprojects/itertools-0.11-rs.wrap            | 10 ---
 subprojects/libc-0.2-rs.wrap                  |  7 --
 .../packagefiles/anyhow-1-rs/meson.build      | 33 --------
 .../anyhow-1-rs/meson/meson.build             |  9 +++
 .../arbitrary-int-1-rs/meson.build            | 21 -----
 .../packagefiles/attrs-0.2-rs/meson.build     | 33 --------
 .../packagefiles/bilge-0.2-rs/meson.build     | 31 -------
 .../bilge-impl-0.2-rs/meson.build             | 44 ----------
 .../bilge-impl-0.2-rs/meson/meson.build       |  3 +
 .../packagefiles/either-1-rs/meson.build      | 26 ------
 .../packagefiles/foreign-0.3-rs/meson.build   | 26 ------
 .../packagefiles/glib-sys-0.21-rs/meson.build | 33 --------
 .../itertools-0.11-rs/meson.build             | 32 --------
 .../packagefiles/libc-0.2-rs/meson.build      | 37 ---------
 .../libc-0.2-rs/meson/meson.build             | 16 ++++
 .../proc-macro-error-1-rs/meson.build         | 41 ----------
 .../proc-macro-error-1-rs/meson/meson.build   |  3 +
 .../proc-macro-error-attr-1-rs/meson.build    | 31 -------
 .../meson/meson.build                         |  3 +
 .../packagefiles/proc-macro2-1-rs/meson.build | 35 --------
 .../proc-macro2-1-rs/meson/meson.build        |  6 ++
 .../packagefiles/quote-1-rs/meson.build       | 31 -------
 .../packagefiles/serde-1-rs/meson.build       | 36 ---------
 .../packagefiles/serde_core-1-rs/meson.build  | 25 ------
 .../serde_core-1-rs/private.rs.in             |  6 ++
 .../serde_derive-1-rs/meson.build             | 35 --------
 subprojects/packagefiles/syn-2-rs/meson.build | 43 ----------
 .../unicode-ident-1-rs/meson.build            | 22 -----
 subprojects/probe-0.5-rs.wrap                 |  7 --
 subprojects/proc-macro-error-1-rs.wrap        | 10 ---
 subprojects/proc-macro-error-attr-1-rs.wrap   | 10 ---
 subprojects/proc-macro2-1-rs.wrap             | 10 ---
 subprojects/quote-1-rs.wrap                   | 10 ---
 subprojects/serde-1-rs.wrap                   |  5 +-
 subprojects/serde_core-1-rs.wrap              |  5 +-
 subprojects/serde_derive-1-rs.wrap            |  5 +-
 subprojects/syn-2-rs.wrap                     | 10 ---
 subprojects/unicode-ident-1-rs.wrap           | 10 ---
 72 files changed, 116 insertions(+), 1053 deletions(-)
 rename rust/Cargo.lock => Cargo.lock (100%)
 rename rust/Cargo.toml => Cargo.toml (97%)
 delete mode 100644 subprojects/anyhow-1-rs.wrap
 delete mode 100644 subprojects/arbitrary-int-1-rs.wrap
 delete mode 100644 subprojects/attrs-0.2-rs.wrap
 delete mode 100644 subprojects/bilge-0.2-rs.wrap
 delete mode 100644 subprojects/bilge-impl-0.2-rs.wrap
 delete mode 100644 subprojects/either-1-rs.wrap
 delete mode 100644 subprojects/foreign-0.3-rs.wrap
 delete mode 100644 subprojects/glib-sys-0.21-rs.wrap
 delete mode 100644 subprojects/itertools-0.11-rs.wrap
 delete mode 100644 subprojects/libc-0.2-rs.wrap
 delete mode 100644 subprojects/packagefiles/anyhow-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/anyhow-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/arbitrary-int-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/attrs-0.2-rs/meson.build
 delete mode 100644 subprojects/packagefiles/bilge-0.2-rs/meson.build
 delete mode 100644 subprojects/packagefiles/bilge-impl-0.2-rs/meson.build
 create mode 100644 subprojects/packagefiles/bilge-impl-0.2-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/either-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/foreign-0.3-rs/meson.build
 delete mode 100644 subprojects/packagefiles/glib-sys-0.21-rs/meson.build
 delete mode 100644 subprojects/packagefiles/itertools-0.11-rs/meson.build
 delete mode 100644 subprojects/packagefiles/libc-0.2-rs/meson.build
 create mode 100644 subprojects/packagefiles/libc-0.2-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/proc-macro-error-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/proc-macro-error-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/proc-macro-error-attr-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/proc-macro-error-attr-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/proc-macro2-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/proc-macro2-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/quote-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/serde-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/serde_core-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/serde_core-1-rs/private.rs.in
 delete mode 100644 subprojects/packagefiles/serde_derive-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/syn-2-rs/meson.build
 delete mode 100644 subprojects/packagefiles/unicode-ident-1-rs/meson.build
 delete mode 100644 subprojects/probe-0.5-rs.wrap
 delete mode 100644 subprojects/proc-macro-error-1-rs.wrap
 delete mode 100644 subprojects/proc-macro-error-attr-1-rs.wrap
 delete mode 100644 subprojects/proc-macro2-1-rs.wrap
 delete mode 100644 subprojects/quote-1-rs.wrap
 delete mode 100644 subprojects/syn-2-rs.wrap
 delete mode 100644 subprojects/unicode-ident-1-rs.wrap

--
2.54.0

#8 lore raw
Quoted 39 lines · Manos Pitsidianakis
Quoted 29 lines · Paolo Bonzini

These are relatively old patches, but it's time to post them now that the light is visible at the end of the Meson tunnel.

Meson 1.11.x greatly increased the ability to parse Cargo.toml and automatically build complete targets out of the information in there---this was more or less always the intention when Manos decided to build Rust crates with Meson, but it took some time to get there.

It still does not support cross compiling, but that should be added in 1.12.0 and should be completely transparent, so it is already possible to post patches for the final shape of the Meson rules.

With this change, it is possible to have a much more compact description of Rust devices in meson.build, compared to what was used before:

_libhpet_rs = cargo_ws.package('hpet').library() rust_devices_ss.add(when: 'CONFIG_X_HPET_RUST', if_true: [declare_dependency(

    link_whole: [_libhpet_rs],
    variables: {'crate': 'hpet'},

)])

For a description of Cargo support in Meson see
https://mesonbuild.com/Rust.html
and https://mesonbuild.com/Rust-module.html#workspace.

Paolo

Quoted 7 lines

Paolo Bonzini (6):
meson: use compiler_target() to get rustc target
rust: switch to cargo subprojects
rust: switch to autogenerated meson rules
rust: remove unnecessary wrap files
rust: use meson automatic parsing of Cargo.toml
scripts: remove now dead parts of rustc_args.py

Quoted 2 lines

Missing patch to update minimum meson version check in configure (it's hardcoded to 1.10.0)?

pythondeps.toml points to 1.11.1 already, but if these new changes require 1.11 then I expect building to stop working with meson 1.10 and rust enabled

Quoted 125 lines
Quoted 125 lines

 configure                                     |  3 -
 meson.build                                   | 13 +--
 rust/Cargo.lock => Cargo.lock                 |  0
 rust/Cargo.toml => Cargo.toml                 |  6 +-
 rust/bindings/chardev-sys/meson.build         | 11 +--
 rust/bindings/hwcore-sys/meson.build          | 11 +--
 rust/bindings/migration-sys/meson.build       | 11 +--
 rust/bindings/qom-sys/meson.build             | 11 +--
 rust/bindings/system-sys/meson.build          | 11 +--
 rust/bindings/util-sys/meson.build            | 11 +--
 rust/bits/meson.build                         |  7 +-
 rust/bql/meson.build                          | 13 +--
 rust/chardev/meson.build                      |  8 +-
 rust/common/meson.build                       | 10 +--
 rust/hw/char/pl011/meson.build                | 22 +----
 rust/hw/core/meson.build                      | 10 +--
 rust/hw/timer/hpet/meson.build                | 17 +---
 rust/meson.build                              | 32 +-------
 rust/migration/meson.build                    |  8 +-
 rust/qemu-macros/meson.build                  | 12 +--
 rust/qom/meson.build                          |  8 +-
 rust/system/meson.build                       |  8 +-
 rust/trace/meson.build                        |  9 +--
 rust/util/meson.build                         |  7 +-
 scripts/qapi/rs_types.py                      |  2 +-
 scripts/rust/rustc_args.py                    | 80 +------------------
 subprojects/anyhow-1-rs.wrap                  |  7 --
 subprojects/arbitrary-int-1-rs.wrap           | 10 ---
 subprojects/attrs-0.2-rs.wrap                 |  7 --
 subprojects/bilge-0.2-rs.wrap                 | 10 ---
 subprojects/bilge-impl-0.2-rs.wrap            | 10 ---
 subprojects/either-1-rs.wrap                  | 10 ---
 subprojects/foreign-0.3-rs.wrap               |  7 --
 subprojects/glib-sys-0.21-rs.wrap             |  7 --
 subprojects/itertools-0.11-rs.wrap            | 10 ---
 subprojects/libc-0.2-rs.wrap                  |  7 --
 .../packagefiles/anyhow-1-rs/meson.build      | 33 --------
 .../anyhow-1-rs/meson/meson.build             |  9 +++
 .../arbitrary-int-1-rs/meson.build            | 21 -----
 .../packagefiles/attrs-0.2-rs/meson.build     | 33 --------
 .../packagefiles/bilge-0.2-rs/meson.build     | 31 -------
 .../bilge-impl-0.2-rs/meson.build             | 44 ----------
 .../bilge-impl-0.2-rs/meson/meson.build       |  3 +
 .../packagefiles/either-1-rs/meson.build      | 26 ------
 .../packagefiles/foreign-0.3-rs/meson.build   | 26 ------
 .../packagefiles/glib-sys-0.21-rs/meson.build | 33 --------
 .../itertools-0.11-rs/meson.build             | 32 --------
 .../packagefiles/libc-0.2-rs/meson.build      | 37 ---------
 .../libc-0.2-rs/meson/meson.build             | 16 ++++
 .../proc-macro-error-1-rs/meson.build         | 41 ----------
 .../proc-macro-error-1-rs/meson/meson.build   |  3 +
 .../proc-macro-error-attr-1-rs/meson.build    | 31 -------
 .../meson/meson.build                         |  3 +
 .../packagefiles/proc-macro2-1-rs/meson.build | 35 --------
 .../proc-macro2-1-rs/meson/meson.build        |  6 ++
 .../packagefiles/quote-1-rs/meson.build       | 31 -------
 .../packagefiles/serde-1-rs/meson.build       | 36 ---------
 .../packagefiles/serde_core-1-rs/meson.build  | 25 ------
 .../serde_core-1-rs/private.rs.in             |  6 ++
 .../serde_derive-1-rs/meson.build             | 35 --------
 subprojects/packagefiles/syn-2-rs/meson.build | 43 ----------
 .../unicode-ident-1-rs/meson.build            | 22 -----
 subprojects/probe-0.5-rs.wrap                 |  7 --
 subprojects/proc-macro-error-1-rs.wrap        | 10 ---
 subprojects/proc-macro-error-attr-1-rs.wrap   | 10 ---
 subprojects/proc-macro2-1-rs.wrap             | 10 ---
 subprojects/quote-1-rs.wrap                   | 10 ---
 subprojects/serde-1-rs.wrap                   |  5 +-
 subprojects/serde_core-1-rs.wrap              |  5 +-
 subprojects/serde_derive-1-rs.wrap            |  5 +-
 subprojects/syn-2-rs.wrap                     | 10 ---
 subprojects/unicode-ident-1-rs.wrap           | 10 ---
 72 files changed, 116 insertions(+), 1053 deletions(-)
 rename rust/Cargo.lock => Cargo.lock (100%)
 rename rust/Cargo.toml => Cargo.toml (97%)
 delete mode 100644 subprojects/anyhow-1-rs.wrap
 delete mode 100644 subprojects/arbitrary-int-1-rs.wrap
 delete mode 100644 subprojects/attrs-0.2-rs.wrap
 delete mode 100644 subprojects/bilge-0.2-rs.wrap
 delete mode 100644 subprojects/bilge-impl-0.2-rs.wrap
 delete mode 100644 subprojects/either-1-rs.wrap
 delete mode 100644 subprojects/foreign-0.3-rs.wrap
 delete mode 100644 subprojects/glib-sys-0.21-rs.wrap
 delete mode 100644 subprojects/itertools-0.11-rs.wrap
 delete mode 100644 subprojects/libc-0.2-rs.wrap
 delete mode 100644 subprojects/packagefiles/anyhow-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/anyhow-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/arbitrary-int-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/attrs-0.2-rs/meson.build
 delete mode 100644 subprojects/packagefiles/bilge-0.2-rs/meson.build
 delete mode 100644 subprojects/packagefiles/bilge-impl-0.2-rs/meson.build
 create mode 100644 subprojects/packagefiles/bilge-impl-0.2-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/either-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/foreign-0.3-rs/meson.build
 delete mode 100644 subprojects/packagefiles/glib-sys-0.21-rs/meson.build
 delete mode 100644 subprojects/packagefiles/itertools-0.11-rs/meson.build
 delete mode 100644 subprojects/packagefiles/libc-0.2-rs/meson.build
 create mode 100644 subprojects/packagefiles/libc-0.2-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/proc-macro-error-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/proc-macro-error-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/proc-macro-error-attr-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/proc-macro-error-attr-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/proc-macro2-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/proc-macro2-1-rs/meson/meson.build
 delete mode 100644 subprojects/packagefiles/quote-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/serde-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/serde_core-1-rs/meson.build
 create mode 100644 subprojects/packagefiles/serde_core-1-rs/private.rs.in
 delete mode 100644 subprojects/packagefiles/serde_derive-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/syn-2-rs/meson.build
 delete mode 100644 subprojects/packagefiles/unicode-ident-1-rs/meson.build
 delete mode 100644 subprojects/probe-0.5-rs.wrap
 delete mode 100644 subprojects/proc-macro-error-1-rs.wrap
 delete mode 100644 subprojects/proc-macro-error-attr-1-rs.wrap
 delete mode 100644 subprojects/proc-macro2-1-rs.wrap
 delete mode 100644 subprojects/quote-1-rs.wrap
 delete mode 100644 subprojects/syn-2-rs.wrap
 delete mode 100644 subprojects/unicode-ident-1-rs.wrap

--
2.54.0

#9 lore raw

Il mar 26 mag 2026, 14:42 Manos Pitsidianakis <
[email protected]> ha scritto:

Quoted 4 lines

pythondeps.toml points to 1.11.1 already, but if these new changes require 1.11 then I expect building to stop working with meson 1.10 and rust enabled

They will require 1.12 for cross compilation but otherwise they should work with 1.11, or at worst master. I posted now only as a preview, just because (after almost two years...) they show an almost final shape of the build system.

They are in the rust-cargo branch of my git repo by the way!

Paolo

Quoted 144 lines
Quoted 81 lines
Quoted 81 lines

 configure                                     |  3 -
 meson.build                                   | 13 +--
 rust/Cargo.lock => Cargo.lock                 |  0
 rust/Cargo.toml => Cargo.toml                 |  6 +-
 rust/bindings/chardev-sys/meson.build         | 11 +--
 rust/bindings/hwcore-sys/meson.build          | 11 +--
 rust/bindings/migration-sys/meson.build       | 11 +--
 rust/bindings/qom-sys/meson.build             | 11 +--
 rust/bindings/system-sys/meson.build          | 11 +--
 rust/bindings/util-sys/meson.build            | 11 +--
 rust/bits/meson.build                         |  7 +-
 rust/bql/meson.build                          | 13 +--
 rust/chardev/meson.build                      |  8 +-
 rust/common/meson.build                       | 10 +--
 rust/hw/char/pl011/meson.build                | 22 +----
 rust/hw/core/meson.build                      | 10 +--
 rust/hw/timer/hpet/meson.build                | 17 +---
 rust/meson.build                              | 32 +-------
 rust/migration/meson.build                    |  8 +-
 rust/qemu-macros/meson.build                  | 12 +--
 rust/qom/meson.build                          |  8 +-
 rust/system/meson.build                       |  8 +-
 rust/trace/meson.build                        |  9 +--
 rust/util/meson.build                         |  7 +-
 scripts/qapi/rs_types.py                      |  2 +-
 scripts/rust/rustc_args.py                    | 80 +------------------
 subprojects/anyhow-1-rs.wrap                  |  7 --
 subprojects/arbitrary-int-1-rs.wrap           | 10 ---
 subprojects/attrs-0.2-rs.wrap                 |  7 --
 subprojects/bilge-0.2-rs.wrap                 | 10 ---
 subprojects/bilge-impl-0.2-rs.wrap            | 10 ---
 subprojects/either-1-rs.wrap                  | 10 ---
 subprojects/foreign-0.3-rs.wrap               |  7 --
 subprojects/glib-sys-0.21-rs.wrap             |  7 --
 subprojects/itertools-0.11-rs.wrap            | 10 ---
 subprojects/libc-0.2-rs.wrap                  |  7 --
 .../packagefiles/anyhow-1-rs/meson.build      | 33 --------
 .../anyhow-1-rs/meson/meson.build             |  9 +++
 .../arbitrary-int-1-rs/meson.build            | 21 -----
 .../packagefiles/attrs-0.2-rs/meson.build     | 33 --------
 .../packagefiles/bilge-0.2-rs/meson.build     | 31 -------
 .../bilge-impl-0.2-rs/meson.build             | 44 ----------
 .../bilge-impl-0.2-rs/meson/meson.build       |  3 +
 .../packagefiles/either-1-rs/meson.build      | 26 ------
 .../packagefiles/foreign-0.3-rs/meson.build   | 26 ------
 .../packagefiles/glib-sys-0.21-rs/meson.build | 33 --------
 .../itertools-0.11-rs/meson.build             | 32 --------
 .../packagefiles/libc-0.2-rs/meson.build      | 37 ---------
 .../libc-0.2-rs/meson/meson.build             | 16 ++++
 .../proc-macro-error-1-rs/meson.build         | 41 ----------
 .../proc-macro-error-1-rs/meson/meson.build   |  3 +
 .../proc-macro-error-attr-1-rs/meson.build    | 31 -------
 .../meson/meson.build                         |  3 +
 .../packagefiles/proc-macro2-1-rs/meson.build | 35 --------
 .../proc-macro2-1-rs/meson/meson.build        |  6 ++
 .../packagefiles/quote-1-rs/meson.build       | 31 -------
 .../packagefiles/serde-1-rs/meson.build       | 36 ---------
 .../packagefiles/serde_core-1-rs/meson.build  | 25 ------
 .../serde_core-1-rs/private.rs.in             |  6 ++
 .../serde_derive-1-rs/meson.build             | 35 --------
 subprojects/packagefiles/syn-2-rs/meson.build | 43 ----------
 .../unicode-ident-1-rs/meson.build            | 22 -----
 subprojects/probe-0.5-rs.wrap                 |  7 --
 subprojects/proc-macro-error-1-rs.wrap        | 10 ---
 subprojects/proc-macro-error-attr-1-rs.wrap   | 10 ---
 subprojects/proc-macro2-1-rs.wrap             | 10 ---
 subprojects/quote-1-rs.wrap                   | 10 ---
 subprojects/serde-1-rs.wrap                   |  5 +-
 subprojects/serde_core-1-rs.wrap              |  5 +-
 subprojects/serde_derive-1-rs.wrap            |  5 +-
 subprojects/syn-2-rs.wrap                     | 10 ---
 subprojects/unicode-ident-1-rs.wrap           | 10 ---
 72 files changed, 116 insertions(+), 1053 deletions(-)
 rename rust/Cargo.lock => Cargo.lock (100%)
 rename rust/Cargo.toml => Cargo.toml (97%)
 delete mode 100644 subprojects/anyhow-1-rs.wrap
 delete mode 100644 subprojects/arbitrary-int-1-rs.wrap
 delete mode 100644 subprojects/attrs-0.2-rs.wrap
 delete mode 100644 subprojects/bilge-0.2-rs.wrap
Quoted 8 lines
Quoted 8 lines
 delete mode 100644 subprojects/bilge-impl-0.2-rs.wrap
 delete mode 100644 subprojects/either-1-rs.wrap
 delete mode 100644 subprojects/foreign-0.3-rs.wrap
 delete mode 100644 subprojects/glib-sys-0.21-rs.wrap
 delete mode 100644 subprojects/itertools-0.11-rs.wrap
 delete mode 100644 subprojects/libc-0.2-rs.wrap
 delete mode 100644 subprojects/packagefiles/anyhow-1-rs/meson.build
 create mode 100644

subprojects/packagefiles/anyhow-1-rs/meson/meson.build

Quoted 1 line
Quoted 1 line
 delete mode 100644

subprojects/packagefiles/arbitrary-int-1-rs/meson.build

Quoted 3 lines
Quoted 3 lines
 delete mode 100644 subprojects/packagefiles/attrs-0.2-rs/meson.build
 delete mode 100644 subprojects/packagefiles/bilge-0.2-rs/meson.build
 delete mode 100644

subprojects/packagefiles/bilge-impl-0.2-rs/meson.build

Quoted 1 line
Quoted 1 line
 create mode 100644

subprojects/packagefiles/bilge-impl-0.2-rs/meson/meson.build

Quoted 3 lines
Quoted 3 lines
 delete mode 100644 subprojects/packagefiles/either-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/foreign-0.3-rs/meson.build
 delete mode 100644

subprojects/packagefiles/glib-sys-0.21-rs/meson.build

Quoted 1 line
Quoted 1 line
 delete mode 100644

subprojects/packagefiles/itertools-0.11-rs/meson.build

Quoted 2 lines
Quoted 2 lines
 delete mode 100644 subprojects/packagefiles/libc-0.2-rs/meson.build
 create mode 100644

subprojects/packagefiles/libc-0.2-rs/meson/meson.build

Quoted 1 line
Quoted 1 line
 delete mode 100644

subprojects/packagefiles/proc-macro-error-1-rs/meson.build

Quoted 1 line
Quoted 1 line
 create mode 100644

subprojects/packagefiles/proc-macro-error-1-rs/meson/meson.build

Quoted 1 line
Quoted 1 line
 delete mode 100644

subprojects/packagefiles/proc-macro-error-attr-1-rs/meson.build

Quoted 1 line
Quoted 1 line
 create mode 100644

subprojects/packagefiles/proc-macro-error-attr-1-rs/meson/meson.build

Quoted 1 line
Quoted 1 line
 delete mode 100644

subprojects/packagefiles/proc-macro2-1-rs/meson.build

Quoted 1 line
Quoted 1 line
 create mode 100644

subprojects/packagefiles/proc-macro2-1-rs/meson/meson.build

Quoted 3 lines
Quoted 3 lines
 delete mode 100644 subprojects/packagefiles/quote-1-rs/meson.build
 delete mode 100644 subprojects/packagefiles/serde-1-rs/meson.build
 delete mode 100644

subprojects/packagefiles/serde_core-1-rs/meson.build

Quoted 1 line
Quoted 1 line
 create mode 100644 subprojects/packagefiles/serde_core-1-rs/

private.rs.in

Quoted 1 line
Quoted 1 line
 delete mode 100644

subprojects/packagefiles/serde_derive-1-rs/meson.build

Quoted 2 lines
Quoted 2 lines
 delete mode 100644 subprojects/packagefiles/syn-2-rs/meson.build
 delete mode 100644

subprojects/packagefiles/unicode-ident-1-rs/meson.build

Quoted 12 lines
Quoted 12 lines
 delete mode 100644 subprojects/probe-0.5-rs.wrap
 delete mode 100644 subprojects/proc-macro-error-1-rs.wrap
 delete mode 100644 subprojects/proc-macro-error-attr-1-rs.wrap
 delete mode 100644 subprojects/proc-macro2-1-rs.wrap
 delete mode 100644 subprojects/quote-1-rs.wrap
 delete mode 100644 subprojects/syn-2-rs.wrap
 delete mode 100644 subprojects/unicode-ident-1-rs.wrap

--
2.54.0