Crates.io | byondapi |
lib.rs | byondapi |
version | 0.4.11 |
source | src |
created_at | 2023-08-03 19:48:28.032176 |
updated_at | 2024-10-26 00:25:38.841538 |
description | Idiomatic Rust bindings for BYONDAPI |
homepage | |
repository | https://github.com/spacestation13/byondapi-rs |
max_upload_size | |
id | 934301 |
size | 52,467 |
This crate implements a rusty safe API for using BYONDAPI.
This library automatically initializes on the first function call, using OnceCell. This initialization can fail in one circumstance: where the symbols needed by the BYONDAPI are not found in the current executable.
The only sane way to handle this is to panic, which will inevitably unwind across the FFI barrier, which is undefined behavior.
There's two ways to fix this and I've chosen the second:
In order to successfully run cargo test, you must have the following files from the most recent BYOND version in your library search path. For Windows, I recommend copying
For Windows, I recommend copying the following files to the crate root, crates/byondapi-rs/
:
byond/bin/byondcore.dll
byond/bin/byondext.dll
byond/bin/byondwin.dll
For Linux, ensure these are in your LD_LIBRARY_PATH
:
byond/bin/libbyond.so
byond/bin/libext.so
Failure to do this will result in an error when trying to run tests.