Configuration

Overview of settings and options.

Plugify uses three main configuration files to manage its behavior, plugins, and language modules: plugify.pconfig, *.pplugin, and *.pmodule. Below is a detailed explanation of each file and its configuration options.

Config Manifest

The plugify.pconfig file is required for the plug testing app to locate the plugify directory and configure its behavior. It should be placed in the root directory and contain the following fields:

plugify.pconfig
{
    "$schema": "https://raw.githubusercontent.com/untrustedmodders/plugify/refs/heads/main/schemas/config.schema.json",
    "paths": {
        "baseDir": "",
        "extensionsDir": "extensions",
        "configsDir": "configs",
        "dataDir": "data",
        "logsDir": "logs",
        "cacheDir": "cache"
    },
    "loading": {
        "preferOwnSymbols": false,
        "maxConcurrentLoads": 4,
        "loadTimeout": 500,
        "exportTimeout": 100,
        "startTimeout": 250
    },
    "security": {
        "whitelistedExtensions": [],
        "blacklistedExtensions": [],
        "excludedDirs": []
    },
    "logging": {
        "severity": "Debug",
        "printReport": false,
        "printLoadOrder": false,
        "printDependencyGraph": false,
        "printDigraphDot": false,
        "exportDigraphDot": ""
    }
}

Configuration Options

Paths
  • baseDir: Specifies the base directory for Plugify. Other relative paths are resolved against this directory.
  • extensionsDir: Directory where plugins and language modules are located (default: extensions).
  • configsDir: Directory for extension configuration files (default: configs). Relative paths are resolved against baseDir.
  • dataDir: Directory for extension data files (default: data). Relative paths are resolved against baseDir.
  • logsDir: Directory for log files (default: logs). Relative paths are resolved against baseDir.
  • cacheDir: Directory for cached files (default: cache). Relative paths are resolved against baseDir.
Loading
  • preferOwnSymbols: Determines whether modules should prefer their own symbols over symbols provided by shared libraries (default: false).
  • maxConcurrentLoads: Maximum number of modules that can be loaded concurrently (default: 4).
  • loadTimeout: Maximum time allowed for loading a module, in milliseconds (default: 500).
  • exportTimeout: Maximum time allowed for resolving module exports, in milliseconds (default: 100).
  • startTimeout: Maximum time allowed for starting a module, in milliseconds (default: 250).
Security
  • whitelistedExtensions: List of extensions explicitly allowed to load.
  • blacklistedExtensions: List of extensions explicitly blocked from loading.
  • excludedDirs: List of directories excluded from extension discovery.
Logging
  • severity: Controls the minimum logging severity. Supported values are none, fatal, error, warning, info, debug, and trace.
  • printReport: Prints the module loading report (default: false).
  • printLoadOrder: Prints the order in which modules are loaded (default: false).
  • printDependencyGraph: Prints the module dependency graph (default: false).
  • printDigraphDot: Prints the dependency graph in DOT format (default: false).

Plugin Manifest

The .pplugin file defines the configuration for a specific plugin. Below is an example:

*.pplugin
{
  "version": "1.0.0",
  "name": "sample_plugin",
  "description": "This is a sample plugin.",
  "author": "untrustedmodders",
  "website": "https://github.com/untrustedmodders/",
  "license": "MIT",
  "entry": "bin/sample_plugin",
  "platforms": [],
  "language": "cpp",
  "dependencies": [],
  "methods": [],
  "classes": []
}

Configuration Options:

  • version: The semantic version of the plugin.
  • name: An alias name for the plugin.
  • description: A brief description or overview of the plugin.
  • author: The creator or author of the plugin.
  • website: The URL linking to the creator's profile or information.
  • license: The license for the plugin.
  • entry: The entry point or main executable for the plugin, specified as bin/sample_plugin. (Depends on the language module.)
  • platforms: An array listing the platforms supported by the plugin. (Currently empty in this example.)
  • language: Information about the programming language module used. In this case, it's specified as "cpp" (C++).
  • dependencies: A list of plugin references specifying the dependencies required for the plugin. This field is crucial for topological sorting to load plugins in the correct order of initialization.
  • methods: An array describing functions/methods exposed by the plugin.
  • classes: An array describing classes exposed by the plugin.

Module Manifest

The .pmodule file defines the configuration for a language module. Below is an example:

*.pmodule
{
    "version": "1.0.0",
    "name": "cpp_module",
    "language": "cpp",
    "description": "Adds support for C++ plugins",
    "author": "untrustedmodders",
    "website": "https://github.com/untrustedmodders/",
    "license": "MIT",
    "platforms": []
}

Configuration Options:

  • version: The semantic version of the language module.
  • name: An alias name for the language module.
  • language: The programming language supported by this module (e.g., "cpp" for C++).
  • description: A brief description or overview of the language module.
  • author: The creator or author of the language module.
  • website: The URL linking to the creator's profile or information.
  • license: The license for the language module.
  • platforms: An array listing the platforms supported by the language module.

Notes:

  • Ensure all configuration files are valid JSON and adhere to the schema provided by Plugify.
  • Use the $schema field to validate your configuration files against the official schema.