MCPcopy Index your code
hub / github.com/ackwell/ironworks

github.com/ackwell/ironworks @0.4.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.4.1 ↗ · + Follow
447 symbols 801 edges 95 files 101 documented · 23%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ironworks

ironworks

Modular FFXIV data toolkit written in rust.

Crates.io docs.rs

ironworks is pre-1.0, and as such its API should be considered unstable. Breaking API changes will be published on new minor versions.


To minimise unused code & dependencies, ironworks is split into a number of discrete features. No features are enabled by default - pick the ones you want to use!

Feature Description
excel Read data from Excel databases.
ffxiv Bindings for using ironworks with FFXIV.
sqpack Navigate and extract files from the SqPack package format.

Additionally, file type readers are opt-in. The feature modules above will automatically enable the file types they need, however if you need additional file types for bespoke purposes, they can be enabled manually. File type features are named by the file's extension, i.e. exl for .exl files.

Getting started

[dependencies]
ironworks = {version = "0.4.1", features = ["excel", "ffxiv", "sqpack"]}
use ironworks::{excel::Excel, ffxiv, file::exl, sqpack::SqPack, Error, Ironworks};

fn main() -> Result<(), Error> {
  // Build the core ironworks instance. Additional resources can be registered
  // for more complicated file layouts.
  let ironworks = Ironworks::new()
    .with_resource(SqPack::new(ffxiv::FsResource::search().unwrap()));

  // Read out files as raw bytes or structured data.
  let bytes = ironworks.file::<Vec<u8>>("exd/root.exl")?;
  let list = ironworks.file::<exl::ExcelList>("exd/root.exl")?;

  // Read fields out of excel.
  let excel = Excel::with()
    .language(ffxiv::Language::English)
    .build(&ironworks, ffxiv::Mapper::new());
  let field = excel.sheet("Item")?.row(37362)?.field(0)?;

  Ok(())
}

Using generated sheets from Excel

In addition to reading individual fields as shown above, it's possible to read entire rows at a time into a struct. To faciliate this, generated sheet definitions are available as a git dependency.

Warning: The data used to generate these structs does not provide any stability guarantees whatsoever. As such, any update to sheet structs should be considered as a semver-major update.

[dependencies]
# ...
ironworks_sheets = {git = "https://github.com/ackwell/ironworks", branch = "sheets/saint-coinach"}
// ...
use ironworks_sheets::{for_type, sheet};

fn main() -> Result<(), Error> {
  // ...
  let field = excel.sheet(for_type::<sheet::Item>())?.row(37362)?.singular;
  // ...
}

Extension points exported contracts — how you extend this code

File (Interface)
A file that can be read from ironworks. [8 implementers]
ironworks/src/file/file.rs
ValueExt (Interface)
Utilities on values to make the above cleaner to work with [1 implementers]
schema/src/saint_coinach/parse.rs
Anyhow (Interface)
(no doc) [1 implementers]
boilmaster/src/http/error.rs
MetadataAdapter (Interface)
(no doc)
generator/template/src/metadata.rs
Resource (Interface)
Resource adapter to fetch information and data on request for a SqPack instance. [2 implementers]
ironworks/src/sqpack/resource.rs
SheetMetadata (Interface)
Metadata containing how to find and read an Excel sheet. [2 implementers]
ironworks/src/excel/metadata.rs
Resource (Interface)
TODO: This shares name with sqpack::resource. conceptually it's similar but also kinda not. thoughts? Resource layer tha
ironworks/src/ironworks.rs
Mapper (Interface)
Mapper to fetch file paths for excel lookups.
ironworks/src/excel/mapper.rs

Core symbols most depended-on inside this repo

read
called by 50
ironworks/src/sqpack/file/file.rs
iter
called by 43
ironworks/src/file/exl.rs
clone
called by 26
ironworks/src/excel/borrowed.rs
to_string
called by 18
ironworks/src/sestring/sestring.rs
try_get_or_insert
called by 8
ironworks/src/utility/option_cache.rs
field
called by 8
ironworks/src/excel/row.rs
find
called by 7
ironworks/src/sqpack/index/index.rs
read_values
called by 6
ironworks/src/file/mdl/mesh.rs

Shape

Method 188
Class 120
Function 100
Enum 29
Interface 10

Languages

Rust100%

Modules by API surface

ironworks/src/file/mdl/structs.rs22 symbols
ironworks/src/file/pbd.rs20 symbols
schema/src/saint_coinach/parse.rs19 symbols
ironworks/src/file/sklb.rs14 symbols
ironworks/src/ffxiv/fs.rs14 symbols
schema/src/saint_coinach/provider.rs13 symbols
ironworks/src/file/mdl/mesh.rs13 symbols
ironworks/src/excel/sheet/sheet.rs11 symbols
ironworks/src/excel/excel.rs11 symbols
generator/src/generate.rs11 symbols
ironworks/src/file/tex.rs10 symbols
ironworks/src/file/mtrl/material.rs10 symbols

For agents

$ claude mcp add ironworks \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact