15 releases (4 breaking)

0.5.0 Jun 8, 2024
0.4.0 May 13, 2024
0.3.2 Apr 9, 2024
0.2.4 Mar 31, 2024
0.1.5 Feb 26, 2024

#709 in Testing

LGPL-3.0

175KB
4.5K 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

~2–11MB
~120K SLoC