#oc-wasm #async-executor #minecraft #opencomputers

oc-wasm-cassette

Provides a convenient entry point wrapper for an OC-Wasm application to use Cassette as an async executor

5 releases (breaking)

0.12.0 Apr 6, 2024
0.4.0 Jan 8, 2024
0.3.0 Dec 30, 2022
0.2.0 Aug 14, 2022
0.1.0 May 21, 2022

#276 in Games

Download history 6/week @ 2024-01-06 83/week @ 2024-02-17 10/week @ 2024-02-24 6/week @ 2024-03-30 154/week @ 2024-04-06

160 downloads per month

GPL-3.0-only

7KB
62 lines

OC-Wasm-Cassette provides a convenient wrapper that makes it easy to use an async fn as a top-level function in an OC-Wasm application.

Usage is as simple as:

async fn main() -> Infallible {
	// Your code here
}

#[no_mangle]
pub extern "C" fn run(arg: i32) -> i32 {
	oc_wasm_cassette::run(arg, main)
}

lib.rs:

OC-Wasm-Cassette provides a convenient wrapper that makes it easy to use an async fn as a top-level function in an OC-Wasm application.

Usage is as simple as:

async fn main() -> Infallible {
    // Your code here
}

#[no_mangle]
pub extern "C" fn run(arg: i32) -> i32 {
    oc_wasm_cassette::run(arg, main)
}

Dependencies

~1MB
~15K SLoC