13 releases

0.3.2 Apr 9, 2024
0.3.1 Apr 9, 2024
0.2.4 Mar 31, 2024
0.1.5 Feb 26, 2024

#252 in Testing

Download history 46/week @ 2024-02-17 344/week @ 2024-02-24 19/week @ 2024-03-02 143/week @ 2024-03-09 62/week @ 2024-03-16 9/week @ 2024-03-23 202/week @ 2024-03-30 361/week @ 2024-04-06 25/week @ 2024-04-13

600 downloads per month

LGPL-3.0

160KB
4K SLoC

MaaFramework Rust bindings


lib.rs:

Rust bindings for MaaFramework

This crate provides Rust bindings for MaaFramework. On top of the raw bindings generated by bindgen, we provide a safe and more rust-friendly wrapper for use.

Pre-requisites

This crate utilizes cmake to find and link to the MaaFramework library. You will need to have cmake installed on your system and make sure that MaaFramework is installed in a place where cmake can find it. In addition, you will also need the MaaFramework library installed on your system to run any tests or binaries that use this crate.

Usage

Refer to the concerning struct for usage examples. Furthermore, you should check the MaaFramework repo to get a more in-depth understanding of the API.

If you have no idea where to start, you can check the [instance] module for starter.

Features

  • internal: Enable internal API for MaaFramework. This enables you to directly access the raw bindings.
  • toolkit: Enable MaaToolkit.
  • sync_context: Enable sync context for MaaFramework.
  • adb: Enable adb controller for MaaFramework.
  • win32: Enable win32 controller for MaaFramework.
  • dbg: Enable debug controller for MaaFramework. This is most likely not needed.
  • custom_recognizer: Enable custom recognizer for MaaFramework.
  • custom_controller: Enable custom controller for MaaFramework.
  • custom_action: Enable custom action for MaaFramework.
  • custom: Enable all custom features for MaaFramework.

The default features include all features so you might want to disable some of them if you don't need them.

Dependencies

~1.7–4.5MB
~98K SLoC