Crates.io | arcdps |
lib.rs | arcdps |
version | 0.10.1 |
source | src |
created_at | 2022-02-27 03:50:07.433134 |
updated_at | 2024-06-06 14:02:16.648504 |
description | Rust bindings for the Guild Wars 2 dps-meter with focus on ease-of-use and performance. |
homepage | |
repository | https://github.com/greaka/arcdps_bindings |
max_upload_size | |
id | 540212 |
size | 48,043 |
This provides arcdps plugin bindings featuring safe, zero-cost abstractions.
Easily integrate into arcdps with just a few lines of code.
Current features include:
imgui-rs
log
crateStill in development:
Still exploring technical boundaries:
A small example showcasing 2 of the many functions provided.
If init
returns an error, arcdps won't consider the plugin as loaded and will display the error.
No other function, except for unofficial-extras functions, will be called afterwards.
use std::error::Error;
use arcdps::UserInfoIter;
arcdps::arcdps_export! {
name: "example addon",
sig: 123, // change this to a random number
unofficial_extras_squad_update: crate::squad_update,
init: crate::init,
}
fn squad_update(users: UserInfoIter) {
for user in users.into_iter() {
println!("{:?}", user);
}
}
fn init(swapchain: Option<NonNull<c_void>>) -> Result<(), Box<dyn Error>> {
match swapchain {
Some(swapchain) => {
println!("init: initialized with swapchain: {:?}", swapchain);
Ok(())
}
None => Err("init: swapchain is None".into()),
}
}