Open phcoder opened 5 years ago
That's a pretty significant level of effort, thanks. Notes:
runtime/runtime-pure
cross platform project, a runtime/runtime-native
project that uses it, then conformance and protoc-gen-kotlin set of native versions. After that, maybe even runtime/runtime-pure-js
and runtime-pure-jvm
if Kotlin MPP doesn't support using a common-only project directly.Thanks for the response. I have to admit I don't have the immediate time to incorporate this but hopefully I can revisit it soon.
If you want I can do the changes you requested and update this PR
I added some flexibility and changed it to use JS/JVM tools on those platforms. By looking through protobufjs it looks like it implements same things as kotlin-pure code and doesn't get advantage of any js functions. So it feels like protobufjs doesn't provide any value. Should we make js and native both use kotlin pure?
Writing this to show my support for this feature! 🙌
@LiewJunTung and @phcoder - Sorry I haven't done more here, I haven't been using Kotlin as much lately in my day job. In general I would take this and make a set of "pure" projects to not disturb the existing projects. Can't make any promises when I can revisit though, sorry.
This provides native variants for all the components.
Code is adapted from java protobuf code.