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§
- bindings
- errors
- Errors produced by rrplug that can be retured to the user
- high
- abstractions :)
- interfaces
- Contains logic for creating and managing interfaces
- low
- lowest access is at
crate::bindings
- macros
- various macros provided/used by rrplug
- mid
- contains structs and functions with minimal abstraction
- plugin
- the plugin trait module
- prelude
- prelude for rrplug
Macros§
- call_
sq_ function - calls any function defined on the sqvm
- call_
sq_ object_ function - calls any function defined on the sqvm from its
SQObject
- create_
external_ interface - creates a type definition for the external trait
- entry
- marco used to generate the entry for your plugin
- impl_
sqvm_ name - macro to implement
SQVMName
- impl_
vmethod - internal rrplug macro
- impl_
vmethods - internal rrplug macro
- offset_
functions - utility macro to get functions and globals from dlls with offsets
- offset_
struct - internal rrplug macro
- sq_
raise_ error Deprecated - sq_raise_error
- sq_
return_ bool Deprecated - sq_return_bool
- sq_
return_ float Deprecated - sq_return_float
- sq_
return_ int Deprecated - sq_return_int
- sq_
return_ notnull Deprecated - sq_return_notnull
- sq_
return_ null Deprecated - sq_return_null
- sq_
return_ string Deprecated - sq_return_string
- sq_
return_ vector Deprecated - sq_return_vector
- to_
c_ string Deprecated - transforms a
String
into a null terminated string - to_
sq_ string Deprecated - use
crate::to_c_string
Attribute Macros§
- as_
interface - creates a valid source interface layout from the provided impl block
- completion
- macro that transforms a function into a that can be used for completion by the engine while also adding a few abstraction layers
- concommand
- proc marco for generating compatible concommand callbacks
- convar
- proc marco for generating compatible convar callbacks
- sqfunction
- proc marco for generating compatible functions with the sqvm.