💡Feature Request
Currently, Fory Java will generate all row codec classes at runtime. You can see it print in the application startup logs - generate source code, compile, load class.
Java supports compiler hooks in the form of annotation processors. This allows you to inspect code under compilation, generate new code, and then have javac continue to compile that.
Would it make sense to add support to Fory to pre-generate codec classes during compile time? Then your deployable application already has all classes available, potentially pre-verified and pre-linked using class data sharing, without bringing a compile step into runtime.
I note some open issues about foryc compiler with a Maven plugin, but this seems to be a different issue, more related to IDL compilation.
The generated code will be less flexible - not possible to dynamically link in an updated version of Fory, you must inline any runtime Fory deps.
Is this an interesting approach? If it would not conflict with any other project future directions, I might attempt a prototype at some point.
💡Feature Request
Currently, Fory Java will generate all row codec classes at runtime. You can see it print in the application startup logs - generate source code, compile, load class.
Java supports compiler hooks in the form of annotation processors. This allows you to inspect code under compilation, generate new code, and then have javac continue to compile that.
Would it make sense to add support to Fory to pre-generate codec classes during compile time? Then your deployable application already has all classes available, potentially pre-verified and pre-linked using class data sharing, without bringing a compile step into runtime.
I note some open issues about foryc compiler with a Maven plugin, but this seems to be a different issue, more related to IDL compilation.
The generated code will be less flexible - not possible to dynamically link in an updated version of Fory, you must inline any runtime Fory deps.
Is this an interesting approach? If it would not conflict with any other project future directions, I might attempt a prototype at some point.