#minecraft #oc-wasm #opencomputers

oc-wasm-safe

Safe but low-level wrappers around the OC-Wasm system call interface

6 releases (3 breaking)

0.4.0 Dec 30, 2022
0.3.1 Nov 18, 2022
0.3.0 Aug 14, 2022
0.2.1 May 14, 2022
0.1.1 Jul 26, 2021

#85 in Games

Download history 12/week @ 2022-10-12 17/week @ 2022-10-19 25/week @ 2022-10-26 31/week @ 2022-11-02 24/week @ 2022-11-09 58/week @ 2022-11-16 10/week @ 2022-11-23 12/week @ 2022-11-30 38/week @ 2022-12-07 7/week @ 2022-12-14 27/week @ 2022-12-21 94/week @ 2022-12-28 8/week @ 2023-01-04 24/week @ 2023-01-11 19/week @ 2023-01-18 45/week @ 2023-01-25

98 downloads per month
Used in 5 crates (4 directly)

GPL-3.0-only

87KB
1K SLoC

OC-Wasm-safe provides a memory-safe but low-level API for Rust code running on OpenComputers computers running the OC-Wasm architecture. This crate provides access to the full capabilities of OpenComputers as well as any other mods that add OpenComputers interoperability by means of Components or Signals. It is generally not meant to be used alone, but rather to provide some useful APIs directly while also serving as a building block for more ergonomic APIs where appropriate.


lib.rs:

This crate provides safe but low-level for the Wasm imports available in the OC-Wasm environment.

Features

The panic feature controls how certain system call errors which should be impossible are handled. When the feature is enabled, a panic is generated in those situations. When the feature is disabled, a Wasm unreachable (trap) instruction is executed instead; this produces smaller code but less useful error messages.

The std feature controls whether error::Error implements std::error::Error, which it cannot do in a no_std environment.

Dependencies

~585KB
~11K SLoC