Plugin SDK for the Polyfield anti-cheat framework. Write detection plugins in Rust, compile to .so, drop into the plugins/ directory.
Download libpolyfield.so from the Releases page and place it next to your game binary.
Create polyfield.toml next to the game binary:
plugins_dir = "plugins"
tick_interval_ms = 50
[dump]
enabled = false
dir = "dump"
mode = "single"
# Block the game from announcing to the public server list
# [server_list]
# block_share = true
# custom_fields = false
# name = "{mapName} - {gamemode}"
# region = "CN"
# Network optimisation (fixes NetworkWriterPool errors + speeds up map load)
# [network_optim]
# enabled = truemkdir pluginsRUST_LOG=info LD_PRELOAD=$PWD/libpolyfield.so ./Polyfield.x86_64The framework will:
- Wait for
GameAssembly.soto load - Initialize the IL2CPP bridge
- Install event hooks (damage, chat, respawn, etc.)
- Load all
.sofiles fromplugins/ - Log to
polyfield.log
[package]
name = "my-plugin"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib"]
[dependencies]
polyfield = { git = "https://github.com/TFireOps/polyfield-sdk" }use polyfield::{declare_plugin, manifest, Ctx, Plugin, PluginManifest};
use polyfield::events::PlayerJoinEvent;
#[derive(Default)]
struct MyPlugin;
impl Plugin for MyPlugin {
fn manifest() -> &'static PluginManifest {
manifest!(
name = "my-plugin",
version = "0.1.0",
authors = "you",
description = "my first plugin",
)
}
fn on_load(&mut self, ctx: &Ctx) {
ctx.log_info("online");
}
fn on_player_join(&mut self, evt: &mut PlayerJoinEvent, ctx: &Ctx) -> bool {
ctx.log_info(&format!("welcome {}", evt.name));
true
}
}
declare_plugin!(MyPlugin::default());cargo build --release
cp target/release/libmy_plugin.so /path/to/game/plugins/Restart the game. Check polyfield.log for your plugin's output.
| Key | Default | Description |
|---|---|---|
plugins_dir |
"plugins" |
Directory to scan for plugin .so files |
tick_interval_ms |
50 |
on_tick interval in milliseconds |
[dump] enabled |
false |
Dump IL2CPP metadata to disk |
[server_list] block_share |
false |
Block public server list announcement |
[server_list] custom_fields |
false |
Rewrite server list fields with templates |
[network_optim] enabled |
false |
Enable Mirror network fixes |
- Linux x86_64 runtime
- Stable Rust toolchain (for building plugins)
- The Polyfield framework binary (
libpolyfield.so) — download from Releases
MIT