Release Day 🎉 #8
Tamschi
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
🌱 Hello flourish!
Well, that's another OSS project launched, finally. This time I'm trying to make signals intuitive, remove boilerplate, improve flexibility and encourage performance-aware application code.
Quick quick-start:
# for apps and testing; libraries should be generic over `SR: SignalsRuntimeRef`. cargo add flourish --features global_signals_runtime
You can also use unmanaged, locally-pinned signals, which don't allocate (given a runtime that doesn't. The included one is unbounded).
See the README and docs.rs for that and much1 more.
To be honest, this library came about as just a building block towards another, long-running project, but since flourish seems useful more generally, I decided to polish it up and release it properly as stand-alone crate. After all, if it's already a standard proposal for another programming language then the design is likely at least somewhat sought for 😉
Note that I've taken a lot of liberties in the adaption to make it overall more idiomatic in Rust, so if there's strangeness, that's likely on my part. I also haven't implemented containers-that-are-signals, but doing so should be fairly straightforward with my approach.
In any case, if you try out this library here, please let me know what you think! 🙇
To me the API is intuitive, but I've worked on this on-and-off for a few months, so it's difficult for me to tell how it would look like with fresh eyes. There are a few areas I'd like feedback on specifically:
Propagation
variants easy to understand?If you have any other comments, do let me know about those also!
You can do that either directly here in the comments or by making a new thread in one of the other categories.
(Requests for breaking changes are fine too! I'd like to get those sorted before v1.0.0, even though flourish itself contains no statics.)
🌬️ Hello
isoprenoid
!isoprenoid
(README) is the signals runtime interface, default implementation, and safe-Rust raw signal abstraction that underlies flourish. You can use this library to make alternative but compatible signal APIs that don't rely on mine:SignalsRuntimeRef
for custom runtimes with different refresh schedules.You could make a bounded, non-allocating runtime or one that propagates only once per outside (game) tick, too.
RawSignal
to create your own signal abstractions in safe-Rust. (All of flourish is made this way.)Alternatively, call into
SignalsRuntimeRef::start
directly to set your signal's callbacks.Footnotes
type-erasure, weak references, async/eager/blocking accessors, shared-from-ref, cell update via transactional callbacks, subscription-reactive cells,
Future
andOption
interop, flushing resource release, … ↩Beta Was this translation helpful? Give feedback.
All reactions