qemu-rust.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] rust: add preludes to all crates
@ 2025-11-17  7:42 Paolo Bonzini
  2025-11-17  7:42 ` [PATCH 1/8] util: add prelude Paolo Bonzini
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Paolo Bonzini @ 2025-11-17  7:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-rust

This series adds a prelude module to all crates, so that
it becomes possible to import from each crate with either
of the following

   use XYZ::prelude::*;
   use XYZ::{self, prelude::*};

The latter is used for items that have a "too common"
name to be put in the prelude: util::Error, util::Result,
migration::Infallible.

Thanks,

Paolo

Paolo Bonzini (8):
  util: add prelude
  common: add prelude
  hwcore: add prelude
  migration: add prelude
  chardev: add prelude
  bql: add prelude
  system: add prelude
  qom: add more to the prelude

 rust/bql/meson.build              |  1 +
 rust/bql/src/lib.rs               |  5 +++++
 rust/bql/src/prelude.rs           |  4 ++++
 rust/chardev/meson.build          |  1 +
 rust/chardev/src/chardev.rs       |  2 +-
 rust/chardev/src/lib.rs           |  5 +++++
 rust/chardev/src/prelude.rs       |  5 +++++
 rust/common/meson.build           | 13 +------------
 rust/common/src/lib.rs            |  5 +++++
 rust/common/src/prelude.rs        |  9 +++++++++
 rust/hw/char/pl011/src/device.rs  | 22 ++++++++--------------
 rust/hw/core/meson.build          |  1 +
 rust/hw/core/src/lib.rs           |  5 +++++
 rust/hw/core/src/prelude.rs       | 14 ++++++++++++++
 rust/hw/core/src/qdev.rs          |  2 +-
 rust/hw/core/src/sysbus.rs        |  2 +-
 rust/hw/core/tests/tests.rs       |  8 ++++----
 rust/hw/timer/hpet/src/device.rs  | 26 +++++++++-----------------
 rust/hw/timer/hpet/src/fw_cfg.rs  |  2 +-
 rust/migration/meson.build        |  1 +
 rust/migration/src/lib.rs         |  5 +++++
 rust/migration/src/migratable.rs  |  2 +-
 rust/migration/src/prelude.rs     | 19 +++++++++++++++++++
 rust/qom/src/prelude.rs           |  4 ++++
 rust/system/meson.build           |  1 +
 rust/system/src/lib.rs            |  5 +++++
 rust/system/src/prelude.rs        |  8 ++++++++
 rust/tests/tests/vmstate_tests.rs |  7 +++----
 rust/util/meson.build             |  1 +
 rust/util/src/lib.rs              |  5 +++++
 rust/util/src/prelude.rs          | 11 +++++++++++
 31 files changed, 145 insertions(+), 56 deletions(-)
 create mode 100644 rust/bql/src/prelude.rs
 create mode 100644 rust/chardev/src/prelude.rs
 create mode 100644 rust/common/src/prelude.rs
 create mode 100644 rust/hw/core/src/prelude.rs
 create mode 100644 rust/migration/src/prelude.rs
 create mode 100644 rust/system/src/prelude.rs
 create mode 100644 rust/util/src/prelude.rs

-- 
2.51.1



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

end of thread, other threads:[~2025-11-17  8:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-17  7:42 [PATCH 0/8] rust: add preludes to all crates Paolo Bonzini
2025-11-17  7:42 ` [PATCH 1/8] util: add prelude Paolo Bonzini
2025-11-17  7:42 ` [PATCH 2/8] common: " Paolo Bonzini
2025-11-17  7:42 ` [PATCH 3/8] hwcore: " Paolo Bonzini
2025-11-17  7:42 ` [PATCH 4/8] migration: " Paolo Bonzini
2025-11-17  7:42 ` [PATCH 5/8] chardev: " Paolo Bonzini
2025-11-17  7:42 ` [PATCH 6/8] bql: " Paolo Bonzini
2025-11-17  7:42 ` [PATCH 7/8] system: " Paolo Bonzini
2025-11-17  7:42 ` [PATCH 8/8] qom: add more to the prelude Paolo Bonzini
2025-11-17  8:03 ` [PATCH 0/8] rust: add preludes to all crates Marc-André Lureau
2025-11-17  8:36   ` Paolo Bonzini

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