Giter Site home page Giter Site logo

Support wasmJs about kstatemachine HOT 6 CLOSED

GuilhE avatar GuilhE commented on June 12, 2024
Support wasmJs

from kstatemachine.

Comments (6)

GuilhE avatar GuilhE commented on June 12, 2024 1

Actually, I haven't been using KStateMachine because I've previously relied on Tinder's StateMachine for both Android and iOS, finding it quite intuitive. However, I've been conducting some market research to explore alternatives, given that Tinder's solution isn't receiving much attention. The upside is that it's lightweight and easy to integrate; it's essentially just a class that you can directly include in your project (since jitpack doesn't yet support KMP), so updating it to support iOS and Wasm was pratically just a matter of bumping versions. Nevertheless, moving forward, I'd prefer a solution that's actively maintained. In summary, while I'm not currently using KStateMachine, I'm open to giving it a try, especially once it becomes available for wasmJs, allowing for compatibility across Android, iOS, desktop, and wasm platforms.

from kstatemachine.

nsk90 avatar nsk90 commented on June 12, 2024

When I added multiplatoform support, I checked that it successfully compiles for JS target. But the second artefact (kstatemachine-coroutines) uses runBlocking function internally which is not supported on JS.
So we can check that main artefact works easily. Just have to add JS target in gradle scripts.
Then maybe it will be possible to cut unsupported api for JS from the second artefact.

Are you ready to try it? you can do it locally and open a PR. Alternatively I can try add JS target for main artefact myself, but I can check it only on compilation level.

from kstatemachine.

GuilhE avatar GuilhE commented on June 12, 2024

I can try and give it a look in runtime, for now, I'm using Tinder's State Machine and since coroutines and atomic-fu already support wasmJs it was just a matter of updating the libraries (I've forked from a fork which originally added support for KMP).
All tests passed, now I'm experimenting with a small POC to see what challenges I face.

from kstatemachine.

GuilhE avatar GuilhE commented on June 12, 2024

Quick feedback, Tinder's State Machine with coroutines: 1.8.0 and atomic-fu: 0.23.2 it's working like a charm 👌🏼
I'll eventually open this POC to the community and share it where if you'll like 😉

from kstatemachine.

nsk90 avatar nsk90 commented on June 12, 2024

So are you going to continue with KStateMachine?

from kstatemachine.

nsk90 avatar nsk90 commented on June 12, 2024

Wasm support added in https://github.com/KStateMachine/kstatemachine/releases/tag/v0.30.0 release

from kstatemachine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.