#oc-wasm #minecraft #opencomputers #system-interface #wasm-interface

no-std oc-wasm-safe

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

9 releases (5 breaking)

0.12.1 Jun 8, 2024
0.12.0 Apr 6, 2024
0.5.0 Jan 8, 2024
0.4.0 Dec 30, 2022
0.1.1 Jul 26, 2021

#258 in Games

Download history 160/week @ 2024-07-27 126/week @ 2024-08-03 111/week @ 2024-08-10 101/week @ 2024-08-17 124/week @ 2024-08-24 102/week @ 2024-08-31 85/week @ 2024-09-07 114/week @ 2024-09-14 104/week @ 2024-09-21 85/week @ 2024-09-28 62/week @ 2024-10-05 57/week @ 2024-10-12 153/week @ 2024-10-19 121/week @ 2024-10-26 86/week @ 2024-11-02 183/week @ 2024-11-09

552 downloads per month
Used in 6 crates (5 directly)

GPL-3.0-only

94KB
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

~660KB
~13K SLoC