-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiplatform support #7
Comments
I am interested in contributing Kotlin/Wasm (still in preview) support once you have made the library multiplatform and added Kotlin/JS support. |
Maybe you could just make the lib fully multiplatform by using https://github.com/Kotlin/kotlinx-atomicfu. |
Yeah sorry, this was on a backlog as I had real-life things to take care of, I'm gonna start working on porting over to Kotlin Multi-Platform today. I'll take a look at atomicfu, and I believe you posted a blog post on Kotlin Multi-Platform somewhere, so I'll give that a read to 👍 |
No problem, and thanks for taking care of that, feel free to share a branch or a PR if you want feedback. The blog post I published recently here is really focused on Kotlin/Wasm but yeah I would like to use effekt for frontend development with Kotlin/Wasm as a lightweight alternative to Compose. |
There is no need for that. Benjamin should use Mutex instead of ReantrantLock, and move to coroutines for concurrency |
So I think I would advise:
|
Yeah, I possibly agree with this approach too. I originally really liked the lightweight approach and 0 dependencies that reactivity/Reactivity.kt had originally. I think ill keep concurrency/Concurrent.kt though because Coroutine usage with EffeKt seems like a common valid use case. Also, I'm not too sure how the decoupling of packages works in kotlin/gradle, would it be possible to include only either |
Could potentially be achieved by using Both Kotlin/JS and Kotlin/Wasm are using dead code elimination so this is potentially not strictly for the footprint goal, but it would be much cleaner to not pollute the classpath when Coroutines are not used by the user project, and avoiding the mandatory dependency also makes sense on JVM side. Feature variants are another way to tackle that kind of need, but not sure we need this level of complexity, so if |
Hum, I am AFK so have not tried but The key point as mentioned above is to not reference Coroutines classes or |
You can make the dependency to kotlinx.coroutines not transitive. dependencies {
implementation("anylib") {
transitive = false
}
} |
Hey guys, just created the dev/multiplatform branch, come check it out! I'm still working on adopting all the other discussions and recommendations that were passed around. Right now in dev/multiplatform the Honestly, I love working on this project, but I may need to allocate my coding time for this project to the weekends for now (as real-life duty calls) |
I did some test and it seems to work as expected on frontend with pretty low footprint, I did various refinements in https://github.com/sdeleuze/effekt/tree/dev/multiplatform feel free to integrate my additional commit. Wasm support will require Kotlin/kotlinx-atomicfu#278. Worth to try the |
Since that's too early to provide Kotlin/Wasm support there, I have added support on KoWasm side via this commit and will leverage upstream effeKt when it will provide Wasm support (I guess Kotlin |
Thanks for the fork, Ill take a look at it in a bit. Gonna work on the concurrency package later today and hopefully Tag an actual release with Multiplatform support |
Kotlin supports cross-compilation to multiple platforms: native/js/jvm.
It would be cool if EffeKt was able to be targeted to be compiled as a Multiplatform project.
The text was updated successfully, but these errors were encountered: