# rickclephas/kmp-nativecoroutines

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/rickclephas-kmp-nativecoroutines).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

1,308 stars · 47 forks · Kotlin · MIT

## Links

- GitHub: https://github.com/rickclephas/KMP-NativeCoroutines
- awesome-repositories: https://awesome-repositories.com/repository/rickclephas-kmp-nativecoroutines.md

## Topics

`combine` `ios` `kmm` `kmp` `kotlin` `kotlin-coroutines` `kotlin-multiplatform` `kotlin-multiplatform-mobile` `macos` `swift`

## Description

This library provides a framework for exposing shared Kotlin asynchronous logic and reactive data streams as native types within cross-platform applications. It acts as a bridge between Kotlin Multiplatform shared code and native Swift environments, enabling the use of shared background tasks and data sequences directly within platform-specific concurrency models and reactive user interface frameworks.

The project utilizes a compiler plugin to perform metadata-driven code generation, which automatically synthesizes native interface layers from annotated shared code. This process maps asynchronous tasks to native functions and converts reactive data streams into native observer patterns, ensuring that type safety and consistent data updates are maintained across language boundaries.

Beyond basic bridging, the library manages cross-platform concurrency by propagating cancellation signals from native interfaces back to shared background processes. This ensures that resources are released correctly when tasks are no longer required. Developers can further customize the generated code through configuration options that define naming conventions and execution scopes to align with existing application architectures.

## Tags

### Software Engineering & Architecture

- [Cross-Platform Concurrency Frameworks](https://awesome-repositories.com/f/software-engineering-architecture/cross-platform-concurrency-frameworks.md) — Provides a framework for managing task cancellation and execution scopes when sharing asynchronous code between Kotlin and Swift.
- [Compile-Time Code Generation](https://awesome-repositories.com/f/software-engineering-architecture/compile-time-code-generation.md) — Uses a compiler plugin to automatically produce native interface layers during the build process.
- [Cancellation Propagation](https://awesome-repositories.com/f/software-engineering-architecture/error-handling/exception-logic-structures/exception-hierarchies/cancellation-propagation.md) — Propagates cancellation signals from native interfaces to background processes to ensure correct resource release. ([source](https://github.com/rickclephas/kmp-nativecoroutines#readme))
- [Reactive Stream Adaptation](https://awesome-repositories.com/f/software-engineering-architecture/reactive-stream-adaptation.md) — Wraps asynchronous data sequences into native observer patterns for integration with reactive UI frameworks.

### Programming Languages & Runtimes

- [Swift Interoperability Bridges](https://awesome-repositories.com/f/programming-languages-runtimes/kotlin-multiplatform-development/swift-interoperability-bridges.md) — Bridges Kotlin Coroutines and Flows into native Swift code for seamless asynchronous communication.
- [Cross-Platform Concurrency Managers](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/concurrency/task-orchestration-frameworks/concurrency-management-libraries/structured-concurrency-managers/cross-platform-concurrency-managers.md) — Coordinates background tasks and cancellation signals between shared Kotlin code and native platform concurrency models.
- [Swift Concurrency Bridges](https://awesome-repositories.com/f/programming-languages-runtimes/asynchronous-task-libraries/swift-task-libraries/swift-concurrency-bridges.md) — Maps asynchronous background tasks and reactive data streams between shared Kotlin logic and native iOS environments.
- [Observable Coroutine Wrappers](https://awesome-repositories.com/f/programming-languages-runtimes/coroutine-orchestrators/observable-coroutine-wrappers.md) — Creates native interface layers for background tasks and data streams to ensure seamless communication. ([source](https://github.com/rickclephas/kmp-nativecoroutines#readme))
- [Concurrency Type Bridges](https://awesome-repositories.com/f/programming-languages-runtimes/cross-language-data-mapping/type-mapping/language-specific-type-mappings/concurrency-type-bridges.md) — Translates concurrency primitives into compatible native types across language boundaries.
- [Kotlin Coroutines Integration](https://awesome-repositories.com/f/programming-languages-runtimes/kotlin-coroutines-integration.md) — Exposes Kotlin Coroutines and Flows as native Swift async functions and Combine publishers.
- [Reactive API Bridging](https://awesome-repositories.com/f/programming-languages-runtimes/reactive-api-bridging.md) — Bridges Kotlin Flows to native reactive streams to maintain type safety and consistent data updates. ([source](https://github.com/rickclephas/kmp-nativecoroutines#readme))

### System Administration & Monitoring

- [Interface Synthesis Plugins](https://awesome-repositories.com/f/system-administration-monitoring/administrative-operations/remote-access-interface-tools/administrative-interfaces/management-interfaces/metadata-driven-interfaces/interface-synthesis-plugins.md) — Analyzes source code annotations to determine how shared logic is exposed to native environments.

### User Interface & Experience

- [Reactive Stream Mappers](https://awesome-repositories.com/f/user-interface-experience/data-to-component-mappings/reactive-stream-mappers.md) — Maps continuous data streams into native reactive interfaces for real-time updates. ([source](https://github.com/rickclephas/kmp-nativecoroutines#readme))

### Web Development

- [Reactive Data Binding](https://awesome-repositories.com/f/web-development/reactive-data-binding.md) — Connects reactive data streams from shared business logic to native user interface components.
- [Coroutine-to-Async Adapters](https://awesome-repositories.com/f/web-development/server-side-frameworks/kotlin-frameworks/async-to-sync-wrappers/coroutine-to-async-adapters.md) — Provides native asynchronous function wrappers for shared Kotlin coroutines. ([source](https://github.com/rickclephas/kmp-nativecoroutines#readme))
