[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PoCv2 10/15] qga/rust: build Rust types
From: |
marcandre . lureau |
Subject: |
[PoCv2 10/15] qga/rust: build Rust types |
Date: |
Mon, 12 Oct 2020 00:35:08 +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 050a47e2a3..bff4107569 100644
--- a/qga/lib.rs
+++ b/qga/lib.rs
@@ -1 +1,2 @@
+mod qapi;
mod qapi_sys;
diff --git a/qga/meson.build b/qga/meson.build
index dbc8f1623b..aedbd07a04 100644
--- a/qga/meson.build
+++ b/qga/meson.build
@@ -49,6 +49,7 @@ qga_rs = declare_dependency()
if with_rust
qga_qapi_rs_outputs = [
'qga-qapi-sys-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.28.0
- [PoCv2 01/15] mingw: fix error __USE_MINGW_ANSI_STDIO redefined, (continued)
- [PoCv2 01/15] mingw: fix error __USE_MINGW_ANSI_STDIO redefined, marcandre . lureau, 2020/10/11
- [PoCv2 02/15] scripts/qapi: teach c_param_type() to return const argument type, marcandre . lureau, 2020/10/11
- [PoCv2 03/15] build-sys: add --with-rust{-target} & basic build infrastructure, marcandre . lureau, 2020/10/11
- [PoCv2 04/15] build-sys: add a cargo-wrapper script, marcandre . lureau, 2020/10/11
- [PoCv2 05/15] qga/rust: build and link an empty static library, marcandre . lureau, 2020/10/11
- [PoCv2 06/15] rust: provide a common crate for QEMU, marcandre . lureau, 2020/10/11
- [PoCv2 07/15] scripts/qapi: add Rust sys bindings generation, marcandre . lureau, 2020/10/11
- [PoCv2 08/15] qga/rust: generate QGA QAPI sys bindings, marcandre . lureau, 2020/10/11
- [PoCv2 09/15] scripts/qapi: add generation of Rust bindings for types, marcandre . lureau, 2020/10/11
- [PoCv2 10/15] qga/rust: build Rust types,
marcandre . lureau <=
- [PoCv2 11/15] qga: add qmp! macro helper, marcandre . lureau, 2020/10/11
- [PoCv2 12/15] qga: implement get-host-name in Rust, marcandre . lureau, 2020/10/11
- [PoCv2 13/15] qga: implement {get,set}-vcpus in Rust, marcandre . lureau, 2020/10/11
- [PoCv2 14/15] travis: add Rust, marcandre . lureau, 2020/10/11
- [PoCv2 15/15] rust: use vendored-sources, marcandre . lureau, 2020/10/11
- Re: [PoCv2 00/15] Rust binding for QAPI (qemu-ga only, for now), no-reply, 2020/10/11