A library is more robust if it plays well with the rest of the ecosystem surrounding it. Arrow integrates with many useful libraries in the Kotlin ecosystem. This is a non-exhaustive list, and we're happy to hear about support for Arrow from other libraries.
Do you maintain or know of a library with support for Arrow? Feel free to open an issue in the repository, and we'll add it to this list. Thanks in advance! 🤩
There's a custom set of rules for Detekt that can help you refine your style when using Arrow.
Testing​
Kotest​
If you want to test the result of a function that uses a type defined in Arrow,
like Either
, you can use the matchers
extension library. If you're using property-based testing (you should!), you can
use generators
for Arrow types.
AssertJ​
Assertions covering Either
and Option
are provided by
this library.
Serialization​
See the corresponding section.
Configuration​
Hoplite​
Hoplite is a great library for handling configurations and supporting various sources, formats, and cascading setups. The library supports most Arrow types for decoding.
Validation​
Akkurate​
Akkurate provides a language to describe complex validation code. It provides integration with Arrow's typed error mechanism.
HTTP​
Retrofit​
If Retrofit is your library of choice for querying HTTP services, this small integration module may come in quite handy.
Ktor​
The main point of contact between Ktor and Arrow is in serialization.
If you're using kotlinx.serialization, you need no further changes other than
importing the serializers with @UseSerializers
.
If you're using Jackson, you can use the
custom mapper,
and pass it to the ContentNegotiation
configuration.
install(ContentNegotiation) {
register(ContentType.Application.Json, JacksonConverter(JsonMapper.mapper))
}
kJWT​
This library adds support for JSON Web Signatures and JSON Web Tokens to the Kotlin and Arrow ecosystems.
Caching​
cache4k​
You can easily integrate cache4k as caching mechanism for memoization.