You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would generate C ABI functions create_SomeOpaqueType, create_SomeOpaqueType, etc. In C++ this would produce a specialized, templated GenericOpaque<T> type. In JS it would be a single type with matchers on its methods.
If you want to use traits from other modules you'd need to define some type of #[diplomat::trait_use = src/traits.rs] thing so the macro can use them (see #752 for a similar design issue).
This is likely to be quite complicated, needing major changes to the AST, HIR, and individual backends.
The text was updated successfully, but these errors were encountered:
In theory, Diplomat could support generics, provided each generic can only pull from a closed set of types.
Something like this:
This would generate C ABI functions
create_SomeOpaqueType
,create_SomeOpaqueType
, etc. In C++ this would produce a specialized, templatedGenericOpaque<T>
type. In JS it would be a single type with matchers on its methods.If you want to use traits from other modules you'd need to define some type of
#[diplomat::trait_use = src/traits.rs]
thing so the macro can use them (see #752 for a similar design issue).This is likely to be quite complicated, needing major changes to the AST, HIR, and individual backends.
The text was updated successfully, but these errors were encountered: