qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] rust: do not generate GLib bindings
@ 2025-10-01  7:49 Paolo Bonzini
  2025-10-01  7:49 ` [PATCH 1/2] subprojects: add glib-sys-rs Paolo Bonzini
  2025-10-01  7:49 ` [PATCH 2/2] rust: use glib-sys Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2025-10-01  7:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-rust, Marc-André Lureau

Don't generate FFI for glib, rely on glib-sys crate.  This makes it
possible to limit Rust to the same minimum version as C code.

The disadvantage is that each bindings module needs to import from
glib explicitly.

The extra lines in Cargo.lock are all build dependencies that are not
used by Meson.  They are only used for glib-sys's build.rs rules,
when running e.g. "cargo check".

Marc-André Lureau (1):
  rust: use glib-sys
  subprojects: add glib-sys-rs

 meson.build                                   |   1 +
 include/hw/core/cpu.h                         |   2 +-
 rust/Cargo.lock                               | 182 ++++++++++++++++++
 rust/Cargo.toml                               |   1 +
 rust/bql/Cargo.toml                           |   3 +
 rust/bql/meson.build                          |   1 +
 rust/bql/src/bindings.rs                      |   4 +
 rust/chardev/Cargo.toml                       |   1 +
 rust/chardev/meson.build                      |   2 +-
 rust/chardev/src/bindings.rs                  |   4 +
 rust/hw/char/pl011/Cargo.toml                 |   1 +
 rust/hw/char/pl011/meson.build                |   1 +
 rust/hw/char/pl011/src/bindings.rs            |   5 +
 rust/hw/core/Cargo.toml                       |   1 +
 rust/hw/core/meson.build                      |   2 +-
 rust/hw/core/src/bindings.rs                  |   3 +
 rust/meson.build                              |   2 +
 rust/migration/Cargo.toml                     |   1 +
 rust/migration/meson.build                    |   2 +-
 rust/migration/src/bindings.rs                |   1 +
 rust/qom/Cargo.toml                           |   1 +
 rust/qom/meson.build                          |   2 +-
 rust/qom/src/bindings.rs                      |   2 +
 rust/system/Cargo.toml                        |   1 +
 rust/system/meson.build                       |   2 +-
 rust/system/src/bindings.rs                   |   4 +
 rust/util/Cargo.toml                          |   1 +
 rust/util/meson.build                         |   2 +-
 rust/util/src/bindings.rs                     |   2 +
 scripts/archive-source.sh                     |   1 +
 subprojects/.gitignore                        |   1 +
 subprojects/glib-sys-0.21-rs.wrap             |   7 +
 .../packagefiles/glib-sys-0.21-rs/meson.build |  33 ++++
 33 files changed, 272 insertions(+), 7 deletions(-)
 create mode 100644 subprojects/glib-sys-0.21-rs.wrap
 create mode 100644 subprojects/packagefiles/glib-sys-0.21-rs/meson.build

-- 
2.51.0



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

end of thread, other threads:[~2025-10-01  7:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-01  7:49 [PATCH 0/2] rust: do not generate GLib bindings Paolo Bonzini
2025-10-01  7:49 ` [PATCH 1/2] subprojects: add glib-sys-rs Paolo Bonzini
2025-10-01  7:49 ` [PATCH 2/2] rust: use glib-sys 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).