When compiling to native binary (.so, framework, ....
# kotlin-native
n
When compiling to native binary (.so, framework, ...), is there any way to filter out some
public
symbols so they won't be exposed? Maybe an annotation?
n
Thanks Artem, that works for Apple. Is there anything else for other platforms?
a
I believe no šŸ˜” Is there a reason why you can’t make them internal?
n
It’s pretty simple, I have a project with many modules which are combined into a single binary. So I need
public
to make stuff accessible to sibling modules, but I need a bit more control over symbols that are actually exposed by the binary to the end user.
If you think it’s a valid use case, I could file a ticket. Also if you can think of any workaround, please let me know! I’m open to write a compiler plugin if it helps.
a
The obvious workaround is to proxy all the library API in the ā€œumbrellaā€ module and export only it. It seems robust but can be cumbersome. But the case is pretty valid nevertheless IMHO.
a