ionspin / kotlin-multiplatform-bignum

A Kotlin multiplatform library for arbitrary precision arithmetics
Apache License 2.0
355 stars 41 forks source link

Modularize to minimize dependencies #103

Closed kevincianfarini closed 4 years ago

kevincianfarini commented 4 years ago

Is your feature request related to a problem? Please describe. When including this library into my project, I noticed that it has a dependency on coroutines. After doing a little bit of research, it looks like this library implements a couple of concurrent safe operations which is why coroutines is required.

Describe the solution you'd like Splitting this library out into modules where one of them houses the concurrent safe operations would be nice.

Describe alternatives you've considered I haven't considered any others.

Additional context I'm working on Corbit -- an asynchronous BitTorrent client in Kotlin. It's being split into modules, and the one which depends on this library directly has no need for concurrency. Splitting this library into modules would make it easy for me to include kotlinx-coroutines only in modules which require async code.

ionspin commented 4 years ago

Hi Kevin,

It's very probable that in the next release I will completely remove the coroutines dependency as I am not really using it. The original reason for them to be included was to try and implement multi-threaded operations, but I haven't made any significant progress there. The other reason why coroutines are getting removed is that they don't support Linux Arm 64 target, and I would like to support it.

I'll keep this issue open until coroutines are removed.

kevincianfarini commented 4 years ago

Awesome :) thanks