Crates.io | ffi_reflect |
lib.rs | ffi_reflect |
version | 1.0.2 |
source | src |
created_at | 2023-05-06 15:35:46.130776 |
updated_at | 2023-05-16 20:23:49.353071 |
description | Provides a derive macro that genreates a reflection method for C-comaptible types |
homepage | |
repository | https://github.com/dngulin/ffi_reflect |
max_upload_size | |
id | 858545 |
size | 3,901 |
The ffi_reflect
is a compile time reflection library, that provides the FfiReflect
derive macro.
The macro itself generates a fucntion pub const fn ffi_reflect() -> FfiType<'static>
that can be useful for bindings generation.
You can derive the FfiReflect
only on structs that are marked with #[repr(C)]
or #[repr(transparent)]
,
on enums that are marked with #[repr($INTEGER_TYPE)]
and unions that are marked with #[repr(C)]
.
You can use the ffi_reflect_csharp
to generate C#-types with the exact same memory layout.