Crate rrplug

source ·
Expand description

§rrplug

framework for working with R2Northstar’s plugin system.

this crate provides convenient abstractions with compile time checks while not limiting unsafe access to any parts of plugin sys or the titanfall 2 engine.

§rrplug template

plugins v4 removed some dependencies on external files so now templates are redundant but a template still exists

§cross compiling plugins

To compile a plugin from a host machine that’s not using windows, you need to install the required target.

rustup target add x86_64-pc-windows-gnu

Then create a cargo config to always compile your project for windows.

mkdir .cargo
echo "[build]\ntarget = \"x86_64-pc-windows-gnu\"" > .cargo/config.toml

Modules§

  • Errors produced by rrplug that can be retured to the user
  • abstractions :)
  • Contains logic for creating and managing interfaces
  • lowest access is at crate::bindings
  • various macros provided/used by rrplug
  • contains structs and functions with minimal abstraction
  • the plugin trait module
  • prelude for rrplug

Macros§

Attribute Macros§

  • creates a valid source interface layout from the provided impl block
  • macro that transforms a function into a that can be used for completion by the engine while also adding a few abstraction layers
  • proc marco for generating compatible concommand callbacks
  • proc marco for generating compatible convar callbacks
  • proc marco for generating compatible functions with the sqvm.