square / wire

gRPC and protocol buffers for Android, Kotlin, Swift and Java.
https://square.github.io/wire/
Apache License 2.0
4.26k stars 571 forks source link

Support IR compiler for JavaScript builds #1895

Open bentemple opened 3 years ago

bentemple commented 3 years ago

The new IR compiler for JavaScript is moving towards production (currently Alpha). It will eventually be the default compiler. If an app or library is built with the IR compiler, all dependencies also have to be compiled with the IR compiler.

In my testing, Okio was pretty trivially switched to compile with BOTH IR and the standard compiler. Wire is a little more extensive of a change as likely many of the generated methods with kotlin poet will need to include the @JSExport flag for anything that should be publicly accessible by Java script.

https://kotlinlang.org/docs/js-ir-compiler.html

As soon as possible it would be amazing for Wire to build the JS sources with the BOTH flag so that Wire is a viable option when building a KMP JS project with the new compiler.

bentemple commented 3 years ago

Depends on https://github.com/square/okio/issues/910