Skip to content

Implement ReprC for re-exported types #166

Discussion options

You must be logged in to vote

Sadly the way trait impls work make it so you cannot implement ReprC for it, and I cannot realistically do it myself, unless I anticipated this and depended on that crate specifically. This is the "{De,}Serialize problem"; only, serde is popular enough to let library authors think of this, whereas other crates not necessarily.

So what you're doing is currently the only direct workaround on your end.

That being said, you could try the same solution as for {De,}Serialize:

  1. fork the crate; and use a patch directive to depend on your fork;
  2. add the #[derive_ReprC] invocations;
    • ideally, feature-gated behind some safer-ffi feature: #[cfg_attr(feature = "safer-ffi", ::safer_ffi::derive_ReprC)]
  3. S…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@liamdiprose
Comment options

Answer selected by liamdiprose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants