Move raw FFI bindings generation to separate crates. This makes it possible to reuse bindgen declarations for a header file in its dependencies (this was not the case before this change), while keeping multiple -sys crates to avoid rebuilding all the code whenever something changes. Because the -sys crates are generated in dependency order, this also enforces that the crates are organized in something that resembles the dependencies between C headers. The meson.build for rust-safe crates becomes simpler, and it should be possible in the future to let Meson's cargo support handle most of it. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> [General cleanup and Python script. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
9 lines
284 B
Meson
9 lines
284 B
Meson
_chardev_rs = static_library(
|
|
'chardev',
|
|
'src/lib.rs',
|
|
link_with: [_bql_rs, _migration_rs, _qom_rs, _util_rs],
|
|
dependencies: [glib_sys_rs, common_rs, qemu_macros, chardev_sys_rs],
|
|
)
|
|
|
|
chardev_rs = declare_dependency(link_with: [_chardev_rs], dependencies: [chardev, qemuutil])
|