Ken Johnson 7f38e0a426 SDK v0.5.3: Add DBAPI types and updated IFWPluginHost
Refresh of the plugin SDK to match fastway-server v0.5.3. Plugins
that want to use the typed DBAPI (DeclareTable/StoreInsert/etc.)
need dbapi_consts.pas for TDBAColumnType/TDBAOnDeleteAction/etc.
and dbapi_dialect.pas for TDBATableSpec/TDBAColumnSpec/TDBACriterion
and the builder helpers (MakeColumn, MakeFK, MakeUnique, etc.).

fw_plugin_api.pas: latest IFWPluginHost with typed DBAPI methods
(DeclareTable, DeclareColumn, DeclareIndex, StoreInsert, StoreUpdate,
StoreDelete, StoreSelect, StoreUpsert) added under plugin API v1
(still in flux — no version bump during pre-production).

Plugin repos vendor this via 'make pull-sdk' which copies these
files into the plugin's local sdk/ dir and pins the commit hash
in sdk/VERSION. Mirrors the Fimail/fpc-msgbase pattern.
2026-04-18 09:03:08 -07:00

Fastway Plugin SDK

The core interface unit required to build plugins for Fastway BBS.

What's Included

Unit Purpose
fw_plugin_api.pas Plugin interface contract — required by all plugins

This is the only shared dependency between the Fastway server and plugins. Everything else (protocol implementations, helpers, etc.) belongs in the individual plugin repos.

Usage

  1. Clone this repo (or download a release)
  2. Copy fw_plugin_api.pas into your plugin's source directory
# Example: setting up a new plugin
mkdir my-plugin && cd my-plugin
cp /path/to/fastway-plugin-sdk/fw_plugin_api.pas .

Plugin API Version

Current API version: 1

All plugins must export FWPluginAPIVersion() returning 1 (or the current version). The server accepts plugins compiled against API versions from FW_MIN_PLUGIN_API_VERSION through FW_PLUGIN_API_VERSION.

Building Plugins

Plugins compile as shared libraries (.so on Linux/FreeBSD, .dll on Windows).

Required compiler flags:

  • -fPIC — Position-independent code (required for shared libraries)
  • cmem must be the first unit in the uses clause

Required exports:

function FWPluginAPIVersion: Integer; cdecl;
function FWPluginCreate(AHost: IFWPluginHost): IFWPlugin; cdecl;
procedure FWPluginDestroy(APlugin: IFWPlugin); cdecl;

Example Makefile:

FPC = /usr/bin/ppcx64
TARGET = myplugin.so
SOURCES = myplugin.pp
SDK = .

FPCFLAGS = -Mobjfpc -Sh -fPIC -CX -XXs -O2 \
    -Fu$(SDK) \
    -FUbuild \
    -o$(TARGET)

all:
	@rm -rf build && mkdir -p build
	$(FPC) $(FPCFLAGS) $(SOURCES)

clean:
	rm -rf build $(TARGET) *.rsj

Plugin Manifest

Every plugin package (.fwp) must include a plugin.json:

{
  "name": "fw-myplugin",
  "version": "0.1.0",
  "api_version": 1,
  "description": "My awesome plugin",
  "author": "Your Name",
  "license": "GPL-3.0",
  "target": "server",
  "category": "utilities",
  "capabilities": ["routes", "admin"],
  "dependencies": [],
  "files": {
    "binary": "myplugin.so",
    "web": ["web/"]
  }
}

Categories

communication, networking, games, utilities, security, protocol, admin, database, scripting, doors, other

Targets

  • server — Runs on the primary Fastway server
  • client — Runs on thin clients (telnet, modem, BinkP, etc.)

License

GPL-3.0

Description
Shared Pascal interfaces and units for building Fastway BBS plugins
Readme 135 KiB
Languages
Pascal 100%