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?
Asked
Active
Viewed 67 times
1 Answers
1
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

Andrew
- 1,073
- 7
- 6
-
And https://github.com/dropbox/djinni/blob/master/src/source/ObjcGenerator.scala#L377 will give me the objc counterpart, right? – vandit jain Aug 27 '20 at 23:16
-
Yep, the code layout and naming is pretty simple, and the literal strings like function names are inline, so searching should be effective for things like this. Changing bits of syntax can be trickier, but I wouldn't expect any side-effects of simply removing those functions. – Andrew Aug 28 '20 at 06:08