Rebuild of the xEdit project in Rust. Additionally features CLI control of all xEdit features and native support for AI agents to control it.
The build plan is in docs/PLAN.md.
- Port xEdit to Rust with 1:1 functionality*
- Morrowind and Enderal are loaded but not verified against the oracle yet (it can not dump or save Morrowind plugins, and Enderal is not installed); verified support comes later
- Match the upstream release build exactly
- The official binaries of the baseline tag (
xedit-4.1.5q) are the oracle; a differential harness compares the port's output with theirs on the real game files, and each phase closes only when its parity gate holds. Upstream quirks are reproduced, not corrected.
- The official binaries of the baseline tag (
- Keep existing scripts, plugins and workflows working. Compatibility with xEdit behaviour, its Pascal scripts and the files it writes wins over every other concern.
- Be easier to contribute to than the Delphi original: a modern toolchain (
cargo build,cargo test, clippy, one command for the parity check), no proprietary compiler, typed interfaces instead of 103 COM-style interfaces in one 50,000-line unit, and a module per upstream unit so the Pascal source stays a readable map of the Rust. - Expose every operation through the
xeditCLI as a typed command with--jsonoutput, stable error codes and a printable schema (xedit schema), so that an AI agent can discover and drive the whole tool without the GUI.- Make mutation safe for agents: an explicit edit flag,
--dry-run, structured outcomes, atomic saves with a backup, and a long-lived session (xedit batch,xedit serve,xedit mcp) that runs the same commands.
- Make mutation safe for agents: an explicit edit flag,
- Stay mergeable with upstream. One Rust module per Pascal unit with matching names, and
upstream-map.tomlrecords the last upstream commit merged into each, so upstream changes map onto the port line by line. - Get faster than upstream once parity holds
- Phases 0 to 2 of the plan are done: every game mode from Morrowind to Starfield and every save format load and dump like the release build, verified file by file against it on the local game installs (Morrowind's masters and Enderal are not verified: the oracle cannot dump Morrowind plugins and Enderal is not installed on the development machine).
- Phase 3 (write path and daemon) is done on draft pull request #12. A loaded plugin can be edited, saved and served to a long-running session, and the saved bytes are xEdit's.
cargo xtask parity oracle-savedrives the xEdit GUI release build headlessly to save every plugin of the corpus and compares the port's save with it: 239 of 249 plugins are byte-identical, 7 are refused with the same message by both, and the 3 Morrowind masters have no oracle save because the 4.1.5q GUI cannot save Morrowind plugins;cargo xtask parity roundtriploads and saves the corpus and agrees.cargo xtask parity oracle-editreplays scripted edit sequences on both: 3 of 4 give the oracle's bytes, and the master update of a plugin with unchanged sorted arrays is the remaining difference. - The write commands are
xedit elements set|add|remove(any element by path, a member, an array entry or a child record such as a reference of a cell),xedit records copy|delete(as an override or a new record, deep, with the masters it needs added),xedit masters add|sort|clean(with every FormID of the plugin rewritten to follow them),xedit formids change|renumber(updating the records that refer to the changed FormIDs),xedit files flags(ESM, ESL, medium, update, blueprint, localized) andxedit save. Every mutating command takes--dry-run, refuses to run without the global--editflag otherwise, and changes memory only untilxedit save. The AfterSet and AfterLoad callbacks of the definitions run, as in xEdit. xedit batchruns several commands in one session, so an edit and its save go together.xedit servekeeps a session loaded and answers every registry command as a JSON-RPC method over stdio or a Windows named pipe, andxedit mcpserves the same commands as MCP tools over stdio; both are built from the registry at run time, keep the--editgate anddry_run, and leave saving to an explicitfiles.save. The skillsusing-xedit-cliandadding-a-commandunder.claude/skillsdescribe how to drive the tool safely and how to add a command.- Loading reads the groups of a plugin on all CPUs and
xedit dumpbuilds and writes the records on all CPUs (--threads N; about five times faster onSkyrim.esmthan on one thread), with output that does not depend on the thread count. - Known gaps of the write path, all listed in docs/PLAN.md under "Owed from phase 3": writing the string tables of a localized plugin (a localized string can not be set or copied), copying over an existing override and partial forms, sorted arrays inside a subrecord, the reference index (records that refer to a FormID are found by a scan until phase 4), the identity FormID of a Morrowind record, and one session per process.
- Later phases (analysis and tool modes, archives and assets, scripting, GUI, performance, release) have not started.
- No new file formats, record definitions or game support beyond what the baseline tag ships. New upstream releases are taken in through the sync procedure, not ahead of it.
- No redesign of the data model, the scripting language or the GUI. JvInterpreter Pascal stays the script language; the GUI reproduces the upstream forms on top of the same commands.
- No separate agent API. Agents use the same command layer as the CLI and the GUI; there is no second surface to keep in step.
- No dependence on a Delphi compiler. The oracle is the released binary, never a rebuild.
- No non-Windows platform before the Windows port is complete. Linux and macOS follow, behind thin platform modules.
- No game files in the repository. The parity corpus comes from local installs through environment variables.
xEdit-rust is a port of xEdit by ElminsterAU and the xEdit contributors. xEdit is licensed under the Mozilla Public License 2.0, and ported files are Modifications that must stay under it, so this whole repository is licensed under MPL-2.0. See NOTICE for attribution and third-party terms.
Rules for contributions: