Leveraging multiplatform libraries

We've now seen several examples of how to write and share common Kotlin code. However, if you're building a real application today, you likely don't want to build everything from scratch. You're probably going to need things such as networking, serialization, settings, and dependency injection. You might want to leverage reactive programming paradigms, or use common tools such as Firebase. For these situations, it's of great benefit to have third-party libraries available that you can rely on for multiplatform implementations.

As of today, the third-party library ecosystem for Kotlin multiplatform is pretty limited. Because the technology is relatively new, there aren't many options out there yet. However, there are a few libraries available that may be quite helpful:

While this is a small set of well established libraries, many more libraries are in active development, including implementations for Firebase, logging, and I/O. As more and more developers begin to work with Kotlin multiplatform, the developer ecosystem should continue to expand, making it easier to find existing tools and libraries. 

While quite exciting in its current state, like everything, Kotlin multiplatform has some drawbacks. In the next section, we will study a few limitations of the Kotlin multiplatform approach to cross-platform code.