[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 6/7] rust: add crate to expose bindings and interfaces
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v7 6/7] rust: add crate to expose bindings and interfaces |
Date: |
Thu, 15 Aug 2024 16:01:17 +0200 |
User-agent: |
Mozilla Thunderbird |
Hi Manos,
On 15/8/24 13:42, Manos Pitsidianakis wrote:
Add rust/qemu-api, which exposes rust-bindgen generated FFI bindings and
provides some declaration macros for symbols visible to the rest of
QEMU.
Co-authored-by: Junjie Mao <junjie.mao@intel.com>
Co-authored-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
---
MAINTAINERS | 6 ++
rust/meson.build | 9 +++
rust/qemu-api/.gitignore | 2 +
rust/qemu-api/Cargo.lock | 7 +++
rust/qemu-api/Cargo.toml | 23 +++++++
rust/qemu-api/README.md | 17 +++++
rust/qemu-api/build.rs | 13 ++++
rust/qemu-api/meson.build | 17 +++++
rust/qemu-api/rustfmt.toml | 1 +
rust/qemu-api/src/bindings.rs | 7 +++
rust/qemu-api/src/definitions.rs | 108 ++++++++++++++++++++++++++++++++
rust/qemu-api/src/device_class.rs | 128 ++++++++++++++++++++++++++++++++++++++
rust/qemu-api/src/lib.rs | 100 +++++++++++++++++++++++++++++
rust/qemu-api/src/tests.rs | 48 ++++++++++++++
rust/rustfmt.toml | 7 +++
15 files changed, 493 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 5464cb2b03..56a88048d2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3348,6 +3348,12 @@ F: hw/core/register.c
F: include/hw/register.h
F: include/hw/registerfields.h
+Rust
+M: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
+S: Maintained
+F: rust/qemu-api
+F: rust/rustfmt.toml
Few lines in docs/devel/rust.rst would be welcomed,
diff --git a/rust/qemu-api/Cargo.toml b/rust/qemu-api/Cargo.toml
new file mode 100644
index 0000000000..51260cbe42
--- /dev/null
+++ b/rust/qemu-api/Cargo.toml
@@ -0,0 +1,23 @@
+[package]
+name = "qemu_api"
+version = "0.1.0"
+edition = "2021"
+license = "GPL-2.0 OR GPL-3.0-or-later"
in particular explaining the license choice.
Should all rust code use it?
Thanks,
Phil.
- [PATCH v7 0/7] Add Rust build support, ARM PL011 device impl, Manos Pitsidianakis, 2024/08/15
- [PATCH v7 1/7] Require meson version 1.5.0, Manos Pitsidianakis, 2024/08/15
- [PATCH v7 2/7] build-sys: Add rust feature option, Manos Pitsidianakis, 2024/08/15
- [PATCH v7 3/7] configure, meson: detect Rust toolchain, Manos Pitsidianakis, 2024/08/15
- [PATCH v7 4/7] rust: add bindgen step as a meson dependency, Manos Pitsidianakis, 2024/08/15
- [PATCH v7 5/7] .gitattributes: add Rust diff and merge attributes, Manos Pitsidianakis, 2024/08/15
- [PATCH v7 6/7] rust: add crate to expose bindings and interfaces, Manos Pitsidianakis, 2024/08/15
- Re: [PATCH v7 6/7] rust: add crate to expose bindings and interfaces,
Philippe Mathieu-Daudé <=
- Re: [PATCH v7 6/7] rust: add crate to expose bindings and interfaces, Junjie Mao, 2024/08/16
[PATCH v7 7/7] rust: add PL011 device model, Manos Pitsidianakis, 2024/08/15
Re: [PATCH v7 0/7] Add Rust build support, ARM PL011 device impl, Peter Maydell, 2024/08/15
Re: [PATCH v7 0/7] Add Rust build support, ARM PL011 device impl, Junjie Mao, 2024/08/16