Crate ffgl_core

source ·
Expand description

§FFGL plugin

This crate provides a set of tools to create FFGL plugins in Rust.

FFGL Plugins require a plugMain function to be defined for the host to call. the plugin_main macro will generate this function for you.

The quickest way to get started is to implement the handler::simplified::SimpleFFGLInstance trait on a struct that represents your plugin instance.

Then, call plugin_main!(SimpleFFGLHandler<YourSimpleFFGLInstanceStruct>) to generate the plugMain function.

If you want to control the details of plugin instantiation, see handler.

§Building

You must compile your library as a cdylib to be loaded by the host. You can do this in your Cargo.toml:

[lib]
crate-type = ["cdylib"]

§Running

To actually run your plugin, you’ll need to copy it to the FFGL plugin directory. On macos, you will need to additionally package it as a bundle. There are helper scripts in the repository that can assist you with this (./deploy_bundle.sh)

§Support

If you have any questions, feel free to send me an email at dev@edt.nz

Feel free to get involved in the repo at github.com/edeetee/ffgl-rs

Re-exports§

Modules§

  • This module contains the basic conversion functions for the FFGL2 API Consumers of this library should have to use this module directly. If you run your plugin with RUST_LOG=trace, you should see what functions are being called.
  • Primary entry point of the FFGL plugin. This is the function that is called by the host. You can use crate::plugin_main to automate calling this entry function from the FFGL ABI
  • Auto generated bindings to ffgl.
  • This module provides the main traits for creating FFGL plugins Use simplified for a simpler way to create plugins
  • Use these to configure what the host expects from your plugin
  • Inputs from the host to your plugin
  • Used to connect the internal FFGL logging system to your rust code.
  • Structs and enums for FFGL parameters Use info::SimpleParamInfo for most simple instances Implement info::ParamInfo yourself for more complex cases (see [example-isf/src/param.rs])

Macros§

  • Generate the extern "C" fn plugMain(op, input, instance) entry point