rust: use meson automatic parsing of Cargo.toml
Subsystems (2)
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
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
@@ -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
@@ -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
PATCH 2/6 rust: switch to cargo subprojects
In reply to Paolo BonziniLet 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
@@ -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
Cargo.toml renamed from rust/Cargo.toml +3 -3
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH 3/6 rust: switch to autogenerated meson rules
In reply to Paolo BonziniMeson 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,3 @@ +extra_args += [ + '--cfg', 'use_fallback', +]
subprojects/packagefiles/either-1-rs/meson.build deleted +0 -26
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,3 @@ +extra_args = [ + '--cfg', 'use_fallback', +]
subprojects/packagefiles/proc-macro-error-attr-1-rs/meson.build deleted +0 -31
@@ -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
@@ -0,0 +1,3 @@ +extra_args += [ + '--cfg', 'use_fallback', +]
subprojects/packagefiles/proc-macro2-1-rs/meson.build deleted +0 -35
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH 4/6 rust: remove unnecessary wrap files
In reply to Paolo BonziniMeson 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH 5/6 rust: use meson automatic parsing of Cargo.toml
In reply to Paolo BonziniFinally, 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH 6/6 scripts: remove now dead parts of rustc_args.py
In reply to Paolo BonziniThe 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
@@ -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
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: usecompiler_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 ofrustc_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
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: usecompiler_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 ofrustc_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
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.wrapQuoted 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 100644subprojects/packagefiles/anyhow-1-rs/meson/meson.build
Quoted 1 line
Quoted 1 line
delete mode 100644subprojects/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 100644subprojects/packagefiles/bilge-impl-0.2-rs/meson.build
Quoted 1 line
Quoted 1 line
create mode 100644subprojects/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 100644subprojects/packagefiles/glib-sys-0.21-rs/meson.build
Quoted 1 line
Quoted 1 line
delete mode 100644subprojects/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 100644subprojects/packagefiles/libc-0.2-rs/meson/meson.build
Quoted 1 line
Quoted 1 line
delete mode 100644subprojects/packagefiles/proc-macro-error-1-rs/meson.build
Quoted 1 line
Quoted 1 line
create mode 100644subprojects/packagefiles/proc-macro-error-1-rs/meson/meson.build
Quoted 1 line
Quoted 1 line
delete mode 100644subprojects/packagefiles/proc-macro-error-attr-1-rs/meson.build
Quoted 1 line
Quoted 1 line
create mode 100644subprojects/packagefiles/proc-macro-error-attr-1-rs/meson/meson.build
Quoted 1 line
Quoted 1 line
delete mode 100644subprojects/packagefiles/proc-macro2-1-rs/meson.build
Quoted 1 line
Quoted 1 line
create mode 100644subprojects/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 100644subprojects/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 100644subprojects/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 100644subprojects/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