From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-rust@nongnu.org, "Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [PATCH 0/2] rust: do not generate GLib bindings
Date: Wed, 1 Oct 2025 09:49:18 +0200 [thread overview]
Message-ID: <20251001074920.1041619-1-pbonzini@redhat.com> (raw)
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
next reply other threads:[~2025-10-01 7:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-01 7:49 Paolo Bonzini [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251001074920.1041619-1-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).