Attribute Macro byondapi_macros::bind
source · #[bind]
Expand description
Macro for generating byond binds Usage:
use byondapi::prelude::*;
#[byondapi::bind]
fn example() {Ok(ByondValue::null())}
#[byondapi::bind("/datum/example/proc/other_example")]
fn example_other(_: ByondValue, _: ByondValue) {Ok(ByondValue::null())}
Then generate the bindings.dm file with
#[test]
fn generate_binds() {
byondapi::byondapi_macros::generate_bindings(env!("CARGO_CRATE_NAME"));
}
and run cargo test to actually create the file