#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

8 releases (breaking)

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

#735 in Games

Download history 14/week @ 2023-12-05 27/week @ 2023-12-12 66/week @ 2023-12-19 45/week @ 2023-12-26 53/week @ 2024-01-02 84/week @ 2024-01-09 106/week @ 2024-01-16 150/week @ 2024-01-23 261/week @ 2024-01-30 98/week @ 2024-02-06 282/week @ 2024-02-13 163/week @ 2024-02-20 212/week @ 2024-02-27 197/week @ 2024-03-05 174/week @ 2024-03-12 203/week @ 2024-03-19

813 downloads per month
Used in 5 crates

GPL-3.0-only

49KB
584 lines

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.7–1MB
~19K SLoC