First off, thank you for considering contributing to typeahead-kmp! It's people like you that make the open-source community thrive.
This engine is designed to be a high-performance, lock-free, and asynchronous fuzzy search tool for Kotlin Multiplatform. We welcome contributions that improve its efficiency, add platform support, or fix bugs.
Before writing any code, please open an issue. Discussing your idea or the bug you've found helps ensure that your effort aligns with the project's architecture, especially considering the complex concurrency and vectorization logic involved.
To set up the project locally for development:
- Fork the repository and clone it to your local machine.
- Open the project in IntelliJ IDEA or Android Studio.
- This project requires JVM 11 as the target.
- Sync the Gradle project.
To run the test suite across platforms and verify your environment:
./gradlew clean checkWhen writing your code, please keep the following in mind:
-
Concurrency: The core of
TypeaheadSearchEnginerelies heavily on coroutines andStateFlowfor lock-free reads. Ensure any new logic respects this thread-safe architecture. -
Testing: If you add a new feature or fix a bug, include a corresponding test in
commonTest. Concurrency tests (like testing multiple writers simultaneously) are highly encouraged. -
Language: Write all comments, commit messages, and KDoc documentation in English.
-
Style: Follow the standard Kotlin coding conventions.
-
Create a new branch for your feature or bugfix (e.g.,
feature/custom-embeddingsorfix/memory-leak). -
Push your changes to your fork.
-
Open a Pull Request against the
mainbranch of this repository. -
Provide a clear description of what your PR does and link to the relevant Issue.
Once submitted, your code will be reviewed, and we might suggest some tweaks before merging. Thank you for your time and effort!