The generated bindings don't need to introspect the contents of a type that's marshaled as a handle, since all such types are marshaled as an opaque pointer. Marshaling a type as a handle should allow for types that aren't directly FFI-safe or can't be fully described to be passed to C#, however we currently require that all types implement Describe. For example, if you have a foreign type that doesn't implement Describe or Abi in a struct that's marshaled by handled, that shouldn't prevent sending the struct to C# as long as the foreign type doesn't appear in the struct's exported interface anywhere.
Right now we're still deriving the Describe impl in the #[cs_bindgen] attribute. Moving this to its own proc-macro derive will give us better control over this situation as well, since more types can implement Describe without necessarily being exported with #[cs_bindgen].
The generated bindings don't need to introspect the contents of a type that's marshaled as a handle, since all such types are marshaled as an opaque pointer. Marshaling a type as a handle should allow for types that aren't directly FFI-safe or can't be fully described to be passed to C#, however we currently require that all types implement
Describe
. For example, if you have a foreign type that doesn't implementDescribe
orAbi
in a struct that's marshaled by handled, that shouldn't prevent sending the struct to C# as long as the foreign type doesn't appear in the struct's exported interface anywhere.Right now we're still deriving the
Describe
impl in the#[cs_bindgen]
attribute. Moving this to its own proc-macro derive will give us better control over this situation as well, since more types can implementDescribe
without necessarily being exported with#[cs_bindgen]
.