Manos Pitsidianakis <manos.pitsidiana...@linaro.org> writes: > Add mechanism to generate rust hw targets that depend on a custom > bindgen target for rust bindings to C. > <snip> > + # We need one bindings_rs build target per arch target, so give them > + # arch-specific names. > + copy = fs.copyfile('rust/wrapper.h', > + target + '_wrapper.h') > + bindings_rs = rust_bindgen.bindgen( > + input: copy, > + dependencies: arch_deps + lib_deps, > + output: 'bindings-' + target + '.rs', > + include_directories: include_directories('.', 'include'), > + args: [ > + '--ctypes-prefix', 'core::ffi', > + '--formatter', 'rustfmt',
I guess we also need to detect rustfmt, although it seems to be non-fatal: 15:59:27 [alex@debian-arm64:~/l/q/b/rust] review/rust-pl011-v4 + ninja [831/3041] Generating bindings for Rust rustmod-bindgen-aarch64-softmmu_wrapper.h Failed to run rustfmt: cannot find binary path (non-fatal, continuing) [3041/3041] Linking target tests/qtest/qos-test <snip> -- Alex Bennée Virtualisation Tech Lead @ Linaro