]> git.ipfire.org Git - thirdparty/qemu.git/commit
rust: cell: add wrapper for FFI types
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Feb 2025 09:18:34 +0000 (10:18 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 6 Mar 2025 11:44:46 +0000 (12:44 +0100)
commit0b9d05e3c98fe168f3502ccc422b9171467314fa
treed485a70bce3fd8e77fcbbeeeeca3552425e11979
parentcff666a3aee566889fcc1ab7167ca0a727af7167
rust: cell: add wrapper for FFI types

Inspired by the same-named type in Linux.  This type provides the compiler
with a correct view of what goes on with FFI types.  In addition, it
separates the glue code from the bindgen-generated code, allowing
traits such as Send, Sync or Zeroable to be specified independently
for C and Rust structs.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
docs/devel/rust.rst
rust/qemu-api/src/cell.rs