-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
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
:
- It should be explicitly stated somewhere that
calloop
is not compatible with the web. We also don't support WASI at the moment. -
calloop::Readiness
,calloop::Mode
,calloop::PostAction
andcalloop::Interest
could benon_exhaustive
. User code doesn't need to match on these. -
calloop::Readiness
'serror
field could be removed, since it's not emitted bypolling
. -
calloop::futures::ExecutorDestroyed
should be made non-instantiable by users. - We can probably deprecate/remove
calloop::generic::FdWrapper
, since it can be replaced byBorrowedFd::borrow_raw
. - Make the
pub
fields ofGeneric
not exposed, or only exposed via methods. - Make
calloop::io::{Readable, Writable}
returnResult<()>
instead of()
. - Make
calloop::ping::{Ping, PingSource}
a newtype wrapper instead of a type alias. - Make
calloop::signal::Singals
's method takeimpl IntoIterator<Item = impl Borrow<Signal>>
instead of&[Signal]
to increase compatibility. - Do we want to keep
calloop::timer::Timer::current_deadline
? ForEventSource::Error
, what do we gain from it beingSync
? Especially since the rest ofcalloop
is usually thread-unsafe.- Do we want to expose
RefCell::ref
inDispatcher
? It might be better to use closures here. -
EventLoop::try_new
should be renamed toEventLoop::new
. (Rename EventLoop::try_new to new #217)
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 loopRc
.
Metadata
Metadata
Assignees
Labels
No labels