#oc-wasm #minecraft #opencomputers

no-std oc-wasm-futures

Futures that allow async/await to be used in OC-Wasm for a more ergonomic experience

10 releases (breaking)

0.12.1 Jun 8, 2024
0.7.0 Jan 8, 2024
0.6.1 Jun 27, 2023
0.6.0 Dec 30, 2022
0.1.0 Jul 26, 2021

#1245 in Asynchronous

Download history 236/week @ 2024-06-01 340/week @ 2024-06-08 128/week @ 2024-06-15 125/week @ 2024-06-22 176/week @ 2024-06-29 128/week @ 2024-07-06 99/week @ 2024-07-13 55/week @ 2024-07-20 156/week @ 2024-07-27 123/week @ 2024-08-03 101/week @ 2024-08-10 98/week @ 2024-08-17 122/week @ 2024-08-24 101/week @ 2024-08-31 83/week @ 2024-09-07 118/week @ 2024-09-14

452 downloads per month
Used in 5 crates

GPL-3.0-only

135KB
1.5K SLoC

OC-Wasm-futures provides a collection of async futures for use in Rust code running on OpenComputers computers running the OC-Wasm architecture. These futures are designed to work with any async executor and provide more ergonomic ways to handle sleeping and making method calls.


lib.rs:

This crate provides a collection of async futures for making method calls and sleeping.

Features

The proper-waker feature, which is enabled by default, makes the sleep futures fully compliant with the Future specification. Disabling the feature uses an alternative implementation which only keeps track of the shortest deadline (rather than the deadlines of all in-progress sleeps); this reduces code size, but only works if your choice of executor polls all tasks on every wakeup (as certain simple executors do) rather than keeping a proper ready-queue and requiring each task to be woken by its own Waker.

Dependencies

~0.6–0.9MB
~19K SLoC