Skip to content
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

Custom Effects #540

Closed
johnpmayer opened this issue Nov 21, 2019 · 4 comments
Closed

Custom Effects #540

johnpmayer opened this issue Nov 21, 2019 · 4 comments
Labels
question Ask away!

Comments

@johnpmayer
Copy link
Contributor

I see that the Event type is a closed enum. I'm not sure what direction you're planning on taking this project (closed, batteries included framework, or meant to be used with arbitrary effects provided by other libraries) but I can't figure out how you might extend the framework to support, for example, integrating the events from a websocket with the lifecycle of a State implementation.

Have you thought a bit about this?

Overall the architecture of this project reminds me a lot of Elm - https://medium.com/@l.mugnaini/the-elm-architecture-tea-animation-3efc555e8faf

@ryanisaacg
Copy link
Owner

So you've caught the project right at the beginning of a transitory period: the entire State abstraction is going away in the next major release. You can actually check out the quicksilver-next branch to get a peek at my work on that, but currently it's a complete mess of the new, undocumented API and old files that I haven't deleted from the working tree yet.

Regarding external event sources, the new API will use async, so you would be able to .await any asynchronous event source you like. While I am planning to support the 0.3.x version with bug fixes, I'm not really planning to make major changes to its API going forward.

@ryanisaacg
Copy link
Owner

The new version is out, with aysnc support! You can bring in other event sources with Future APIs, like select! on a web socket and a Quicksilver event.

@johnpmayer
Copy link
Contributor Author

I think it would make sense to put together some examples, I don't quite follow where the select goes, in the main loop? Are you talking about https://rust-lang.github.io/async-book/06_multiple_futures/03_select.html ?

@ryanisaacg
Copy link
Owner

I'll add it to the documentation backlog in #552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Ask away!
Projects
None yet
Development

No branches or pull requests

2 participants