uniffi-rs icon indicating copy to clipboard operation
uniffi-rs copied to clipboard

Interface/Protocol use in foreign generated code

Open dowski opened this issue 7 months ago • 4 comments

Thanks for uniffi, I'm using v 0.28 and it's been working out well in my early explorations. I've hit a snag though.

If I create a UDL like:

namespace sample {};

interface Foo {
  Bar doBar();
};

interface Bar {
  void doNothing();
};

it seems like the concrete type is used in the generated Kotlin FooInterface code, something like:

public interface FooInterface {
  fun `doBar`() : Bar

Is there any way to tell uniffi to use BarInterface in place of Bar in the generated FooInterface?

dowski avatar Jul 16 '24 17:07 dowski