qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency


From: Alex Bennée
Subject: Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency
Date: Wed, 10 Jul 2024 09:55:26 +0100

Manos Pitsidianakis <manos.pitsidianakis@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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]