I'd like to stabilize calloop's public API to reduce breaking changes. This way when we release v1.0, we shouldn't have to release v2.0. Since we have no more public dependencies as of v0.14.0 this is now feasible.
Potential semver hazards, just from glancing over docs.rs:
Other possible improvements:
- Enable all features on docs.rs
- Web compatibility? Probably not feasible.
- Add a way to get a
LoopHandle reference without cloning the loop Rc.
I'd like to stabilize
calloop's public API to reduce breaking changes. This way when we release v1.0, we shouldn't have to release v2.0. Since we have no more public dependencies as of v0.14.0 this is now feasible.Potential semver hazards, just from glancing over
docs.rs:calloopis not compatible with the web. We also don't support WASI at the moment.calloop::Readiness,calloop::Mode,calloop::PostActionandcalloop::Interestcould benon_exhaustive. User code doesn't need to match on these.calloop::Readiness'serrorfield could be removed, since it's not emitted bypolling.calloop::futures::ExecutorDestroyedshould be made non-instantiable by users.calloop::generic::FdWrapper, since it can be replaced byBorrowedFd::borrow_raw.pubfields ofGenericnot exposed, or only exposed via methods.calloop::io::{Readable, Writable}returnResult<()>instead of().calloop::ping::{Ping, PingSource}a newtype wrapper instead of a type alias.calloop::signal::Singals's method takeimpl IntoIterator<Item = impl Borrow<Signal>>instead of&[Signal]to increase compatibility.calloop::timer::Timer::current_deadline?ForEventSource::Error, what do we gain from it beingSync? Especially since the rest ofcalloopis usually thread-unsafe.RefCell::refinDispatcher? It might be better to use closures here.EventLoop::try_newshould be renamed toEventLoop::new. (Rename EventLoop::try_new to new #217)Other possible improvements:
LoopHandlereference without cloning the loopRc.