FOnline Engine
Current master GitHub
Documentation Docs/en/reference/native-extension/roles.md

Native Extension Roles

Generated reference. Do not edit directly. Update BuildTools/NativeExtensionInterface.json, then run python BuildTools/docs_native_extension.py --write.

Index Roles Hooks Bindings Canonical JSON Guide

These are the roles consumed by the current Engine targets. Every resolved source also enters FO_SOURCE_META_FILES before code generation.

Stable ID Role Source list Library Primary header Consumers Script targets Purpose
native-extension.role.common COMMON FO_COMMON_SOURCE CommonLib Common.h client, server, mapper, baker, animation-viewer, particle-viewer, ascompiler, tests common Code shared by every enabled engine role; use only for genuinely common dependencies and hooks.
native-extension.role.server SERVER FO_SERVER_SOURCE ServerLib Server.h server, tests server Authoritative server-only code and script exports.
native-extension.role.client CLIENT FO_CLIENT_SOURCE ClientLib Client.h client, server, mapper, baker, animation-viewer, particle-viewer, ascompiler, tests client, mapper Client runtime code; server controller paths, Mapper, both focused viewers, BakerLib, and ASCompiler link ClientLib, while only client and mapper are script export targets.
native-extension.role.mapper MAPPER FO_MAPPER_SOURCE MapperLib Mapper.h mapper, tests mapper Mapper-only native tooling and mapper script exports.
native-extension.role.baker BAKER FO_BAKER_SOURCE BakerLib Baker.h mapper, baker, animation-viewer, particle-viewer, ascompiler, tests - Resource-baker extensions shared by Baker, Mapper, both focused viewers, and ASCompiler; BAKER is not a script export target.
native-extension.role.tests TESTS FO_TESTS_SOURCE UnitTests/Coverage executable catch_amalgamated.hpp tests, coverage - Project-native Catch2 translation units compiled directly into enabled unit-test and coverage executables; TESTS has no runtime or script-export consumer.

Registration shape

AddEngineSources(
    COMMON SourceExt/CommonExtension.cpp
    SERVER SourceExt/ServerExtension.cpp
    CLIENT SourceExt/ClientExtension.cpp)
RegisterEngineSources()

Paths and globs are resolved relative to the embedding-project contribution root. The current helper does not reject an unknown role token: it creates an FO__SOURCE list, but no Engine target consumes that list unless the role is documented above.

Start typing to search.