This blog post is based on Arnaud Giuliani's talk at KotlinConf 2024, where he shared our...
The Koin Journey — Unlocking Compiler Power
Building software should feel like expressing ideas, not fighting tools.
That's the belief that started Koin. Not just "DI should be simpler", but that the gap between what developers want to build and how they have to build it should disappear. Tools should amplify creativity, not constrain it. From my almost 20 years of building software, this idea has driven the last eight of them.
Nine years ago, dependency injection on Android meant Dagger. Powerful, but complex. Java Annotation processing magic. Long compilation times. Configurations that felt like solving puzzles instead of building products.
The Kotlin ecosystem was young. And I saw an opening.
What if DI could feel like Kotlin itself? Readable. Intuitive. Something you write once and forget about — because it just works.
No annotations to memorize. No generated code to debug. If you can read Kotlin, you can read your DI configuration. The tradeoff for this pure Kotlin DSL at maximum performance: manual wiring. The famous (or infamous) get() function inside your configuration. You tell Koin what to inject.
That was the spark behind Koin.
The community response surprised me. Developers weren't just using Koin. They were embracing the intent. The idea that simplicity isn't a compromise, it's a strength. By the time this DSL idea has been greatly improved.
We were early to Android Architecture Components in 2018. Before that, Android development meant more boilerplate, more manual wiring, or generated magic. We proposed the by viewModel() function to help inject the new ViewModel components, before Google introduced by viewModels(). We helped shape patterns that are now standard across the ecosystem.
Today, Koin reaches 250 million downloads per year. From startups to enterprises, teams trust it to power their apps. But here's what matters more than numbers: developers tell us Koin makes their work feel lighter. That's what matters.
The journey kept expanding.
Kotlin Multiplatform was a new territory. Koin was one of the first DI solutions there. Back in 2018, working on Kotlin/Native's memory challenges (remind you about freezing objects for native parts). We believed Kotlin would go everywhere, so Koin had to follow.
Jetpack Compose changed the paradigm again. Initiated by the Google Team, JetBrains followed with Compose Multiplatform, allowing new patterns and new possibilities. Koin evolved with it. Now, Compose Navigation3 is bringing new navigation capacity to the Compose world. And Koin is part of that story. The boundaries keep shifting, and we keep moving with them.
None of this happened alone. Many contributors shaped Koin over the years: code, ideas, and patience. The project grew because people believed in it. To everyone who contributed: thank you.
I'll be honest. There were hard moments.
The DSL, for all its elegance, had limits. Testing APIs like checkModules() or verify() could only go so far. And the lack of compile-time safety became a real point of friction. Some developers loved the flexibility. Others wanted guarantees. Both were right.
I always believed you shouldn't have to choose between simplicity and safety. Between readable code and confident builds. But the technology to deliver both didn't exist yet.
The K2 compiler API has been stabilizing since the launch of Kotlin 2.0. The JetBrains team re-architected their previous compiler approach. This changed everything. A compiler plugin isn't just code generation: it's full native code integration. The compiler sees your code at its deepest level. No generated files. No separate toolchain. Same compilation speed.
Others in the ecosystem started exploring this path. The moment was right.
This was the opportunity to give Koin what it always deserved: compile-time power without sacrificing its soul.
Here's what this unlocks:
- DSL and Annotations unified by the compiler. Write Kotlin your way. The compiler handles all the wiring.
- Missing dependencies caught at build time, not in production. No more hoping your tests cover every edge case.
- Pre-calculated dependency graphs. Instant startup. Performance that rivals Dagger, with simplicity that remains Koin.
Both approaches. Same compiler. Same safety. Your choice, always.
But this isn't just about features. It's about where we're going.
I see a future where dependency injection is a solved problem. Not something developers debate or struggle with. Just infrastructure that works. You configure it once, and it disappears into the background of your project.
Koin's role in that future: the DI solution that follows Kotlin everywhere it goes. Android, Server, iOS, Web, Desktop. One tool, all platforms. Consistent patterns, consistent experience.
Always pushing for a better Kotlin developer experience. That's the mission.
What's now possible:
- Compile-time safety without sacrificing simplicity
- Performance without complexity
- Enterprise scale with startup ease
- Runtime flexibility when you need it — dynamic modules, feature flags
- A foundation for features we couldn't build before
This is just the beginning. Full compile verification, pre-calculated module indexes, and deeper IDE integration. The compiler plugin opens doors we're only starting to explore. The Koin Compiler Plugin is in its first phase of testing (version 0.3.0). The next phases will bring more.
We need your feedback. Try it. Push it. Help us shape what comes next. Documentation is updated. Patterns are clearer. And yes, in an era where AI assists our coding, simplicity matters more than ever. Clear coding patterns are easier for humans and machines.
With Kotzilla, as part of the Kotlin Foundation, we're committed to this ecosystem. We help Kotlin become the language developers reach for first, everywhere. Nine years of building this with a community that believed in it. This wouldn't exist without you.
Koin simplicity, now powered by the compiler.
The best tools disappear into your workflow. That's always been the goal. Now we have the technology to get there.
Simplicity AND Power. You don't have to choose.