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§
- calls any function defined on the sqvm
- calls any function defined on the sqvm from its
SQObject
- creates a type definition for the external trait
- marco used to generate the entry for your plugin
- macro to implement
SQVMName
- internal rrplug macro
- internal rrplug macro
- utility macro to get functions and globals from dlls with offsets
- internal rrplug macro
- sq_raise_errorDeprecatedsq_raise_error
- sq_return_boolDeprecatedsq_return_bool
- sq_return_floatDeprecatedsq_return_float
- sq_return_intDeprecatedsq_return_int
- sq_return_notnullDeprecatedsq_return_notnull
- sq_return_nullDeprecatedsq_return_null
- sq_return_stringDeprecatedsq_return_string
- sq_return_vectorDeprecatedsq_return_vector
- to_c_stringDeprecatedtransforms a
String
into a null terminated string - to_sq_stringDeprecated
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.