moirai-async
Async runtime integration for the Moirai
concurrency library — the concurrent domain, distinct from the synchronous
data-parallel domain in moirai-parallel.
io—AsyncRead/AsyncWrite(signature-identical tofutures-io) withAsyncReadExt/AsyncWriteExt, plusTokioCompat/MoiraiCompatbridges.net— nativeTcpStream,TcpListener,UdpSocket, and connection pooling on Unix and Windows. Browser networking uses the WebSocket handles inmoirai-pal.fs— async file operations (read,write,File,FileOpenOptions, …), including exact cursor-preservingAsyncReadAtandAsyncLengthaccess.timer—sleep,timeout,interval,RateLimiter,TimerWheel.sync—Mutex,RwLock,Semaphore,Notify,Broadcast,Watch.executor— nativeAsyncExecutorandAsyncHandle.
[]
= "0.5"
use Duration;
async
The #[moirai_async::main] attribute (from
moirai-async-macros) rewrites
the function into a synchronous native main that builds a default
AsyncExecutor and blocks on the body.
Full documentation: https://docs.rs/moirai-async
UdpSocket::bind_with_config applies PAL-owned native options before returning
the socket. UdpConfig.buffers has independent optional NonZeroUsize receive
and send requests; absent requests retain kernel defaults. buffer_sizes()
reads effective native sizes, including caps, rounding and metadata accounting.
UdpConfig.multicast takes an explicit MulticastConfig group/interface variant
and joins that group while selecting the same outgoing interface. Invalid
native integer ranges, groups, families and interfaces return errors. See
ADR 0081 for the migration
from the former ignored buffer_size and multicast boolean.
License
Licensed under either of Apache-2.0 or MIT at your option.