[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC v3 27/32] qga/rust: build high-level Rust QAPI types
From: |
marcandre . lureau |
Subject: |
[RFC v3 27/32] qga/rust: build high-level Rust QAPI types |
Date: |
Tue, 7 Sep 2021 16:19:38 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
qga/lib.rs | 1 +
qga/meson.build | 1 +
qga/qapi.rs | 6 ++++++
3 files changed, 8 insertions(+)
create mode 100644 qga/qapi.rs
diff --git a/qga/lib.rs b/qga/lib.rs
index 17cf43a5e9..7f62788ff6 100644
--- a/qga/lib.rs
+++ b/qga/lib.rs
@@ -1 +1,2 @@
+mod qapi;
mod qapi_ffi;
diff --git a/qga/meson.build b/qga/meson.build
index f2064c1874..16775bc905 100644
--- a/qga/meson.build
+++ b/qga/meson.build
@@ -58,6 +58,7 @@ qga_rs = declare_dependency()
if with_rust
qga_qapi_rs_outputs = [
'qga-qapi-ffi-types.rs',
+ 'qga-qapi-types.rs',
]
qapi_gen_rs_files = custom_target('QGA QAPI Rust bindings',
diff --git a/qga/qapi.rs b/qga/qapi.rs
new file mode 100644
index 0000000000..e4b9113300
--- /dev/null
+++ b/qga/qapi.rs
@@ -0,0 +1,6 @@
+#![allow(dead_code)]
+use common::*;
+
+new_ptr!();
+
+include!(concat!(env!("MESON_BUILD_ROOT"), "/qga/qga-qapi-types.rs"));
--
2.33.0.113.g6c40894d24
- [RFC v3 17/32] scripts/qapi: learn to generate ABI dump for Rust FFI, (continued)
- [RFC v3 17/32] scripts/qapi: learn to generate ABI dump for Rust FFI, marcandre . lureau, 2021/09/07
- [RFC v3 18/32] tests: generate Rust bindings, marcandre . lureau, 2021/09/07
- [RFC v3 19/32] tests: check Rust and C CABI diffs, marcandre . lureau, 2021/09/07
- [RFC v3 20/32] scripts/qapi: generate high-level Rust bindings, marcandre . lureau, 2021/09/07
- [RFC v3 22/32] qga: build qapi-cabi binary (ABI from C), marcandre . lureau, 2021/09/07
- [RFC v3 21/32] tests/rust: build a common library, checking bindings compile, marcandre . lureau, 2021/09/07
- [RFC v3 23/32] qga/rust: build and link an empty static library, marcandre . lureau, 2021/09/07
- [RFC v3 24/32] qga/rust: generate QGA QAPI types FFI bindings, marcandre . lureau, 2021/09/07
- [RFC v3 25/32] qga/rust: build a qga-cabi-rs executable (ABI from Rust), marcandre . lureau, 2021/09/07
- [RFC v3 26/32] qga/rust: check the Rust C binding, marcandre . lureau, 2021/09/07
- [RFC v3 27/32] qga/rust: build high-level Rust QAPI types,
marcandre . lureau <=
- [RFC v3 28/32] qga/rust: implement get-host-name in Rust (example), marcandre . lureau, 2021/09/07
- [RFC v3 29/32] qga/rust: implement {get,set}-vcpus in Rust (example), marcandre . lureau, 2021/09/07
- [RFC v3 30/32] tests/vm: add Rust to FreeBSD VM, marcandre . lureau, 2021/09/07
- [RFC v3 31/32] tests/vm: bump fedora VM to f32, marcandre . lureau, 2021/09/07
- [RFC v3 32/32] tests/vm: add Rust to Fedora, marcandre . lureau, 2021/09/07
- Re: [RFC v3 00/32] Rust binding for QAPI and qemu-ga QMP handler examples, Markus Armbruster, 2021/09/08