Search code examples
c++objective-cdjinni

How to get rid of Djinni generated unnecessary function - ToString (in Java)/Description (in Objc)?


I am trying to understand the impact of Djinni generated function on binary-size of my cross-platform project. My project does not have a need for these generated ToString/description functions. Is there a way to get rid of them?


Solution

  • There's no built-in flag to disable them, but if you're comfortable modifying the Djinni Scala code it wouldn't be too hard to simply delete the lines which generate those functions. For instance, here's the relevant code block for Java generation: https://github.com/dropbox/djinni/blob/master/src/source/JavaGenerator.scala#L419