2025-11-02 12:27:48 +01:00
2025-10-29 20:35:12 +01:00
2025-11-02 12:27:48 +01:00
2025-11-01 23:28:52 +01:00
2025-10-29 14:55:11 +01:00
2025-11-01 13:14:23 +01:00
2025-11-01 23:28:52 +01:00
2025-10-29 14:55:11 +01:00
2025-11-02 12:27:48 +01:00
2025-10-29 14:55:11 +01:00

OC2R Rust

Thin, synchronous access to the OpenComputers II: Reimagined high-level API for Rust.

This repository is a workspace and is divided into multiple crates:

  • crates/oc2r-core: mirrors the stock Lua helpers (devices.lua) so you can list devices, invoke methods, subscribe to events, and work with the low-level RPC primitives.
  • crates/opencomputers: provides strongly typed wrappers for the opencomputers HLAPI peripherals.
  • crates/minapk: minimal Alpine-style package installer tailored for OC2R Minux.

Development

To ease developpemnt we use cross-rs, but you can install all toolchain component or your local computer and replace cross with cargo.

By default the option "-Zfmt-debug=none" is set meaning all debug print (:?) are off. If you can disable this option at any time.

There are more size optimisation done you can check the .cargo/config.toml, Cargo.toml, Cross.toml and min-sized-rust for more info.

Compilation

Simply do cross clippy --all-targets to compile everything

Examples

Each crates has some examples of how to use it crate are in the examples directory.

Copy the resulting binaries from target/<triple>/release/examples/ into Minux (an Import/Export card works well), mark them as executable and then execute them inside the VM.

Description
No description provided
Readme 233 KiB
Languages
Rust 99.7%
Shell 0.3%