Skip to content

Repository files navigation

bethkit

Build License Rust

Bethkit is a Rust workspace for reading, writing, and inspecting Bethesda plugin and archive formats. The project is in active development, and its public APIs may still change before a stable release.

Skyrim Special Edition is the current schema-backed target. The lower-level format APIs also model other Bethesda games, but Bethkit release builds currently include only the Skyrim Special Edition schema.

Components

  • bethkit-io provides bounded cursors, memory-mapped input, and compression support.
  • bethkit-core provides schema-independent plugin parsing, writing, patching, string tables, load-order handling, and record caches.
  • bethkit-schema loads versioned schema packages and optional build-time catalogs.
  • bethkit-semantic provides schema-guided views, editing, validation, references, conflicts, and cleaning operations.
  • bethkit-bsa reads and writes supported BSA and BA2 archive variants.
  • bethkit-ffi exposes the Rust functionality through a C ABI and the checked-in bethkit.h header.

Skyrim Special Edition schema

Bethkit does not store generated schema packages in Git. The release workflow downloads only skyrim_se.bkschema from xDump v0.1.0, verifies its pinned SHA-256 value, embeds it in the release FFI libraries, and includes the standalone package in each platform archive. Ordinary local workspace builds remain schema-free unless the Skyrim schema feature and a verified package path are supplied explicitly.

The definitions originate in the xEdit project. Modding-Forge/xDump pins the upstream xEdit source, builds the exporter, audits the conversion rules, validates the result, and publishes the package consumed by Bethkit.

See SCHEMA.md for provenance, measured coverage, validation results, and current limitations.

Documentation

Python bindings are maintained separately in Modding-Forge/bethkit.py.

Related projects

The projects below solve overlapping problems with different APIs and tradeoffs. This table is intended as orientation, not as a ranking.

Project Primary form Schema approach Practical focus
Bethkit Rust crates and C ABI Runtime schema packages; release builds currently embed Skyrim Special Edition only Embeddable plugin, archive, and semantic operations
xEdit Delphi desktop application and command-line modes Upstream definitions covering Bethesda record formats and editor behavior Interactive inspection, conflict analysis, cleaning, editing, and reference behavior
Mutagen .NET libraries Generated, statically typed record APIs C# mod inspection and patcher development
sse-plugin-interface Python package Skyrim Special Edition-oriented Python model Lightweight Python access for Skyrim plugin workflows

Bethkit does not replace xEdit as a reference implementation or interactive modding tool. Its current schema-backed Skyrim support exists because xEdit's definitions can be exported and consumed by a smaller embeddable runtime.

Build and test

Bethkit targets stable Rust and edition 2021.

cargo build --workspace
cargo lint
cargo test --workspace

Tests that require installed game data skip automatically when their local fixtures are unavailable. See local build setup for the optional live-test configuration.

License

Apache-2.0

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages