mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
rust: add crate to expose bindings and interfaces
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> Link: https://lore.kernel.org/r/0fb23fbe211761b263aacec03deaf85c0cc39995.1727961605.git.manos.pitsidianakis@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
dc43b18d2e
commit
5a5110d290
13 changed files with 541 additions and 0 deletions
21
rust/qemu-api/meson.build
Normal file
21
rust/qemu-api/meson.build
Normal file
|
@ -0,0 +1,21 @@
|
|||
_qemu_api_rs = static_library(
|
||||
'qemu_api',
|
||||
structured_sources(
|
||||
[
|
||||
'src/lib.rs',
|
||||
'src/definitions.rs',
|
||||
'src/device_class.rs',
|
||||
],
|
||||
{'.' : bindings_rs},
|
||||
),
|
||||
override_options: ['rust_std=2021', 'build.rust_std=2021'],
|
||||
rust_abi: 'rust',
|
||||
rust_args: rustc_args + [
|
||||
'--cfg', 'MESON',
|
||||
# '--cfg', 'feature="allocator"',
|
||||
],
|
||||
)
|
||||
|
||||
qemu_api = declare_dependency(
|
||||
link_with: _qemu_api_rs,
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue