Commit e6977017 authored by Zeeshan Ali's avatar Zeeshan Ali

WIP: Generate Rust code for our D-Bus interfaces

parent bdaf6069
Pipeline #27363 failed with stage
in 6 minutes and 30 seconds
dbus_interface_dir = join_paths(datadir, 'dbus-1', 'interfaces')
geoclue_iface_sources = []
geoclue_iface_rust_sources = []
cargo = find_program('cargo')
dbus_codegen_rs_fetch_cmd = [
cargo,
'install', 'dbus-codegen',
'--bin', 'dbus-codegen-rust',
'--root', meson.current_build_dir() ]
dbus_codegen_rs_dep = custom_target(
'dbus_codegen_rs_dep',
command: dbus_codegen_rs_cmd)
dbus_codegen_path = join_paths(
meson.current_build_dir(),
'bin',
'dbus-codegen-rust')
dbus_codegen_rs = find_program(dbus_codegen_path)
dbus_codegen_rs_cmd = [dbus_codegen_rs, '<', '@INPUT@', '>', '@OUTPUT@']
# Client interface
client_interface_xml = 'org.freedesktop.GeoClue2.Client.xml'
......@@ -10,6 +28,13 @@ geoclue_iface_sources += gnome.gdbus_codegen(
interface_prefix: 'org.freedesktop.GeoClue2.',
namespace: 'GClueDBus',
docbook: 'docs')
geoclue_iface_rust_sources += custom_target(
'gclue-client-interface',
input: client_interface_xml,
output: 'client-dbus-rs',
depends: dbus_codegen_rs_dep,
command: dbus_codegen_rs_cmd)
# Location interface
location_interface_xml = 'org.freedesktop.GeoClue2.Location.xml'
geoclue_iface_sources += gnome.gdbus_codegen(
......@@ -18,6 +43,7 @@ geoclue_iface_sources += gnome.gdbus_codegen(
interface_prefix: 'org.freedesktop.GeoClue2.',
namespace: 'GClueDBus',
docbook: 'docs')
# Manager interface
manager_interface_xml = 'org.freedesktop.GeoClue2.Manager.xml'
geoclue_iface_sources += gnome.gdbus_codegen(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment