This includes: - bumping MSRV to 1.83.0 to support const_refs_to_static - Zhao's safe, builder-based implementation of migration callbacks - Manos's qdev properties macro. While bit-based properties are not yet supported, that's a small change overall. - the Rust crate split from Marc-André - adding proc macro aliases in individual crates, also from Marc-André
I'm still not convinced about having "bql" depend on "migration", but I am convinced by the crate split between "util" and "bql", so we can move the implementation of VMState from "bql" to "migration" later if needed. For the purpose of getting this in as an easy-to-use base for future development, I'm disabling CI from Debian and Ubuntu. The plan is: - that Debian will require trixie to enable Rust usage - that Ubuntu will backport 1.83 to its 22.04 and 24.04 versions (https://bugs.launchpad.net/ubuntu/+source/rustc-1.83/+bug/2120318) - that Marc-André or someone else will add Rust to other CI jobs Also planned for 10.2 from me is using rustc to link emulators (already written but requires Meson 1.9.1) and possibly some work on BQL-free HPET, especially with respect to migration. I'll probably resubmit https://lore.kernel.org/qemu-devel/[email protected]/ too, since improvements to migration support will likely result in more procedural macro attributes. I'll send the next update some time in October, probably once Ubuntu gets the newer version of the compiler. I'm now going to mostly disappear for a week. :) Paolo Manos Pitsidianakis (1): rust: add qdev Device derive macro Marc-André Lureau (22): docs/rust: update msrv rust: remove unused global qemu "allocator" rust: add workspace authors rust: move vmstate_clock!() to qdev module rust: move VMState handling to QOM module rust: move Cell vmstate impl rust: split Rust-only "common" crate rust: make build.rs generic over various ./rust/projects rust: split "util" crate rust: split "migration" crate rust: split "bql" crate rust: split "qom" crate rust: split "chardev" crate rust: split "system" crate rust: split "hwcore" crate rust: rename qemu_api_macros -> qemu_macros rust/hpet: drop now unneeded qemu_api dep rust/pl011: drop dependency on qemu_api rust: repurpose qemu_api -> tests rust: re-export qemu_macros internal helper in "bits" rust: re-export qemu macros from common/qom/hwcore docs: update rust.rst Paolo Bonzini (9): ci: temporarily remove rust from Debian and Ubuntu configure: bump Meson to 1.9.0 for use with Rust meson, cargo: require Rust 1.83.0 rust: add missing const markers for MSRV==1.83.0 rust: use inline const expressions rust: vmstate: use const_refs_to_static rust: qdev: const_refs_to_static rust: meson: remove unnecessary complication in device crates rust: do not inline do_init_io Zhao Liu (1): rust: vmstate: convert to use builder pattern MAINTAINERS | 12 +- docs/devel/rust.rst | 93 ++-- configure | 4 +- meson.build | 10 +- rust/bql/wrapper.h | 27 + rust/chardev/wrapper.h | 28 + rust/hw/char/pl011/wrapper.h | 51 ++ rust/hw/core/wrapper.h | 32 ++ rust/{qemu-api => migration}/wrapper.h | 20 - rust/qom/wrapper.h | 27 + rust/system/wrapper.h | 29 + rust/util/wrapper.h | 32 ++ .gitlab-ci.d/buildtest.yml | 6 +- clippy.toml | 2 +- python/scripts/vendor.py | 4 +- python/wheels/meson-1.8.1-py3-none-any.whl | Bin 1013001 -> 0 bytes python/wheels/meson-1.9.0-py3-none-any.whl | Bin 0 -> 1029634 bytes pythondeps.toml | 4 +- rust/Cargo.lock | 125 ++++- rust/Cargo.toml | 19 +- .../src/bindings.rs => bindings/src/lib.rs} | 12 +- rust/bits/Cargo.toml | 2 +- rust/bits/meson.build | 2 +- rust/bits/src/lib.rs | 13 +- rust/bql/Cargo.toml | 23 + rust/bql/build.rs | 1 + rust/bql/meson.build | 52 ++ rust/bql/src/bindings.rs | 25 + rust/{qemu-api => bql}/src/cell.rs | 336 ++---------- rust/bql/src/lib.rs | 29 + rust/chardev/Cargo.toml | 23 + rust/chardev/build.rs | 1 + rust/chardev/meson.build | 41 ++ rust/chardev/src/bindings.rs | 36 ++ rust/{qemu-api => chardev}/src/chardev.rs | 25 +- rust/chardev/src/lib.rs | 6 + rust/common/Cargo.toml | 20 + rust/common/meson.build | 34 ++ rust/{qemu-api => common}/src/assertions.rs | 24 +- rust/{qemu-api => common}/src/bitops.rs | 1 - rust/{qemu-api => common}/src/callbacks.rs | 37 +- rust/{qemu-api => common}/src/errno.rs | 19 +- rust/common/src/lib.rs | 22 + rust/common/src/opaque.rs | 236 ++++++++ rust/{qemu-api => common}/src/uninit.rs | 8 +- rust/common/src/zeroable.rs | 18 + rust/hw/char/pl011/Cargo.toml | 10 +- rust/hw/char/pl011/build.rs | 1 + rust/hw/char/pl011/meson.build | 39 +- rust/hw/char/pl011/src/bindings.rs | 27 + rust/hw/char/pl011/src/device.rs | 195 +++---- rust/hw/char/pl011/src/lib.rs | 1 + rust/hw/char/pl011/src/registers.rs | 4 +- rust/hw/core/Cargo.toml | 26 + rust/hw/core/build.rs | 1 + rust/hw/core/meson.build | 80 +++ rust/hw/core/src/bindings.rs | 41 ++ rust/{qemu-api => hw/core}/src/irq.rs | 16 +- rust/hw/core/src/lib.rs | 15 + rust/{qemu-api => hw/core}/src/qdev.rs | 111 ++-- rust/{qemu-api => hw/core}/src/sysbus.rs | 24 +- rust/{qemu-api => hw/core}/tests/tests.rs | 52 +- rust/hw/timer/hpet/Cargo.toml | 9 +- rust/hw/timer/hpet/meson.build | 12 +- rust/hw/timer/hpet/src/device.rs | 227 ++++---- rust/hw/timer/hpet/src/fw_cfg.rs | 6 +- rust/meson.build | 15 +- rust/migration/Cargo.toml | 20 + rust/migration/build.rs | 1 + rust/migration/meson.build | 53 ++ rust/migration/src/bindings.rs | 48 ++ rust/migration/src/lib.rs | 6 + rust/{qemu-api => migration}/src/vmstate.rs | 519 +++++++++++------- rust/qemu-api/.gitignore | 2 - rust/qemu-api/README.md | 19 - rust/qemu-api/meson.build | 114 ---- rust/qemu-api/src/lib.rs | 174 ------ rust/qemu-api/src/prelude.rs | 31 -- rust/qemu-api/src/zeroable.rs | 37 -- .../Cargo.toml | 2 +- .../meson.build | 10 +- .../src/bits.rs | 0 .../src/lib.rs | 170 +++++- .../src/tests.rs | 115 +++- rust/qom/Cargo.toml | 23 + rust/qom/build.rs | 1 + rust/qom/meson.build | 43 ++ rust/qom/src/bindings.rs | 25 + rust/qom/src/lib.rs | 13 + rust/qom/src/prelude.rs | 12 + rust/{qemu-api => qom}/src/qom.rs | 31 +- rust/system/Cargo.toml | 21 + rust/system/build.rs | 1 + rust/system/meson.build | 42 ++ rust/system/src/bindings.rs | 41 ++ rust/system/src/lib.rs | 6 + rust/{qemu-api => system}/src/memory.rs | 21 +- rust/tests/Cargo.toml | 26 + rust/tests/meson.build | 14 + .../tests/vmstate_tests.rs | 160 +++--- rust/{qemu-api => util}/Cargo.toml | 14 +- rust/{qemu-api => util}/build.rs | 10 +- rust/util/meson.build | 55 ++ rust/util/src/bindings.rs | 25 + rust/{qemu-api => util}/src/error.rs | 6 +- rust/util/src/lib.rs | 9 + rust/{qemu-api => util}/src/log.rs | 16 +- rust/{qemu-api => util}/src/module.rs | 2 +- rust/{qemu-api => util}/src/timer.rs | 16 +- 109 files changed, 2868 insertions(+), 1569 deletions(-) create mode 100644 rust/bql/wrapper.h create mode 100644 rust/chardev/wrapper.h create mode 100644 rust/hw/char/pl011/wrapper.h create mode 100644 rust/hw/core/wrapper.h rename rust/{qemu-api => migration}/wrapper.h (77%) create mode 100644 rust/qom/wrapper.h create mode 100644 rust/system/wrapper.h create mode 100644 rust/util/wrapper.h delete mode 100644 python/wheels/meson-1.8.1-py3-none-any.whl create mode 100644 python/wheels/meson-1.9.0-py3-none-any.whl rename rust/{qemu-api/src/bindings.rs => bindings/src/lib.rs} (89%) create mode 100644 rust/bql/Cargo.toml create mode 120000 rust/bql/build.rs create mode 100644 rust/bql/meson.build create mode 100644 rust/bql/src/bindings.rs rename rust/{qemu-api => bql}/src/cell.rs (70%) create mode 100644 rust/bql/src/lib.rs create mode 100644 rust/chardev/Cargo.toml create mode 120000 rust/chardev/build.rs create mode 100644 rust/chardev/meson.build create mode 100644 rust/chardev/src/bindings.rs rename rust/{qemu-api => chardev}/src/chardev.rs (94%) create mode 100644 rust/chardev/src/lib.rs create mode 100644 rust/common/Cargo.toml create mode 100644 rust/common/meson.build rename rust/{qemu-api => common}/src/assertions.rs (86%) rename rust/{qemu-api => common}/src/bitops.rs (98%) rename rust/{qemu-api => common}/src/callbacks.rs (85%) rename rust/{qemu-api => common}/src/errno.rs (96%) create mode 100644 rust/common/src/lib.rs create mode 100644 rust/common/src/opaque.rs rename rust/{qemu-api => common}/src/uninit.rs (91%) create mode 100644 rust/common/src/zeroable.rs create mode 120000 rust/hw/char/pl011/build.rs create mode 100644 rust/hw/char/pl011/src/bindings.rs create mode 100644 rust/hw/core/Cargo.toml create mode 120000 rust/hw/core/build.rs create mode 100644 rust/hw/core/meson.build create mode 100644 rust/hw/core/src/bindings.rs rename rust/{qemu-api => hw/core}/src/irq.rs (93%) create mode 100644 rust/hw/core/src/lib.rs rename rust/{qemu-api => hw/core}/src/qdev.rs (82%) rename rust/{qemu-api => hw/core}/src/sysbus.rs (90%) rename rust/{qemu-api => hw/core}/tests/tests.rs (78%) create mode 100644 rust/migration/Cargo.toml create mode 120000 rust/migration/build.rs create mode 100644 rust/migration/meson.build create mode 100644 rust/migration/src/bindings.rs create mode 100644 rust/migration/src/lib.rs rename rust/{qemu-api => migration}/src/vmstate.rs (61%) delete mode 100644 rust/qemu-api/.gitignore delete mode 100644 rust/qemu-api/README.md delete mode 100644 rust/qemu-api/meson.build delete mode 100644 rust/qemu-api/src/lib.rs delete mode 100644 rust/qemu-api/src/prelude.rs delete mode 100644 rust/qemu-api/src/zeroable.rs rename rust/{qemu-api-macros => qemu-macros}/Cargo.toml (94%) rename rust/{qemu-api-macros => qemu-macros}/meson.build (63%) rename rust/{qemu-api-macros => qemu-macros}/src/bits.rs (100%) rename rust/{qemu-api-macros => qemu-macros}/src/lib.rs (54%) rename rust/{qemu-api-macros => qemu-macros}/src/tests.rs (50%) create mode 100644 rust/qom/Cargo.toml create mode 120000 rust/qom/build.rs create mode 100644 rust/qom/meson.build create mode 100644 rust/qom/src/bindings.rs create mode 100644 rust/qom/src/lib.rs create mode 100644 rust/qom/src/prelude.rs rename rust/{qemu-api => qom}/src/qom.rs (97%) create mode 100644 rust/system/Cargo.toml create mode 120000 rust/system/build.rs create mode 100644 rust/system/meson.build create mode 100644 rust/system/src/bindings.rs create mode 100644 rust/system/src/lib.rs rename rust/{qemu-api => system}/src/memory.rs (90%) create mode 100644 rust/tests/Cargo.toml create mode 100644 rust/tests/meson.build rename rust/{qemu-api => tests}/tests/vmstate_tests.rs (78%) rename rust/{qemu-api => util}/Cargo.toml (55%) rename rust/{qemu-api => util}/build.rs (81%) create mode 100644 rust/util/meson.build create mode 100644 rust/util/src/bindings.rs rename rust/{qemu-api => util}/src/error.rs (98%) create mode 100644 rust/util/src/lib.rs rename rust/{qemu-api => util}/src/log.rs (93%) rename rust/{qemu-api => util}/src/module.rs (97%) rename rust/{qemu-api => util}/src/timer.rs (91%) -- 2.51.0
