#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

#909 in Games

Download history 108/week @ 2024-07-26 159/week @ 2024-08-02 108/week @ 2024-08-09 82/week @ 2024-08-16 123/week @ 2024-08-23 110/week @ 2024-08-30 89/week @ 2024-09-06 116/week @ 2024-09-13 109/week @ 2024-09-20 90/week @ 2024-09-27 70/week @ 2024-10-04 55/week @ 2024-10-11 138/week @ 2024-10-18 118/week @ 2024-10-25 87/week @ 2024-11-01 166/week @ 2024-11-08

524 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