On Mon, May 26, 2025 at 04:24:46PM +0200, Paolo Bonzini wrote:
> Date: Mon, 26 May 2025 16:24:46 +0200
> From: Paolo Bonzini <pbonz...@redhat.com>
> Subject: [PATCH 03/12] subprojects: add the foreign crate
> X-Mailer: git-send-email 2.49.0
> 
> This is a cleaned up and separated version of the patches at
> https://lore.kernel.org/all/20240701145853.1394967-4-pbonz...@redhat.com/
> https://lore.kernel.org/all/20240701145853.1394967-5-pbonz...@redhat.com/
>
> Its first user will be the Error bindings; for example a QEMU Error ** can be
> converted to a Rust Option using
> 
>      unsafe { Option::<Error>::from_foreign(c_error) }
> 
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> ---
>  subprojects/.gitignore                        |  1 +
>  subprojects/foreign-0.2-rs.wrap               |  7 +++++

It seems you've already released v0.3.0.

>  .../packagefiles/foreign-0.2-rs/meson.build   | 26 +++++++++++++++++++
>  3 files changed, 34 insertions(+)
>  create mode 100644 subprojects/foreign-0.2-rs.wrap
>  create mode 100644 subprojects/packagefiles/foreign-0.2-rs/meson.build

I went through foreign crate and it was really helpful (and there are also
missing changes as anyhow crate patch). With nits fixed,

Reviewed-by: Zhao Liu <zhao1....@intel.com>


Maybe off topic, it seems the Owned<T> wrapper is very similar to
OwnedPointer<T>. Is it possible to integrate the two? i.e., build
Owned<T: ObjectType> based on OwnedPointer<T: FreeForeign>?

Thanks,
Zhao


Reply via email to