Physis is a Rust library for reading and writing FFXIV data.
use physis::{
Error,
resource::{SqPackResource, Resource},
model::MDL,
};
fn main() -> Result<(), Error> {
// Construct a resource to read from SqPack:
let mut resource = SqPackResource::from_existing("game");
// Read the raw data of this file, our resource takes care of decompressing it:
let bytes = resource.read(".mdl").ok_or(Error::Unknown)?;
// Or read and parse it:
let mdl = resource.parsed::<MDL>("test.mdl")?;
Ok(())
}Physis can be used to apply patches for launchers, build modding tools - and these are C++ projects! We can also power server emulators which deal with a lot of Excel and zone data. Our dependency tree is small, so we are also easy to use on the web.
We aim to support all game versions (A Realm Reborn onward), including the benchmarks. We also try to support all platforms - including the Playstation 3.
Physis compiles and runs on all major platforms including Windows, macOS, Linux and WebAssembly.
To use Physis in your project, add it as a dependency in your Cargo.toml:
[dependencies]
physis = "0.5"Documentation is available online at docs.xiv.zone. It's automatically updated as new commits are pushed to the main branch.
C and C++ projects (or any compatible language through FFI) can use libphysis.
Feel free to submit PRs for fixing bugs or adding functionality. Filing issues is appreciated, but I do this in my free time so please don't expect professional support.
See CONTRIBUTING for more information about contributing back to the project!
- ironworks for inspiration and reference.
- goatcorp for XIVQuickLauncher, docs.xiv.dev, and more.
- Ioncannon for initially documenting the file formats.
- binrw team for the awesome Rust library that powers our parsing!
- sha1-smol for a dependency-free SHA1 implementation.
- FFXIVTools for it's Havok parsing implementation.
- texture2ddecoder for it's BCn texture decoding functions.
And everyone else who writes open-source software for FFXIV!
This project is licensed under the GNU General Public License 3. Some parts of the code or assets may be licensed differently, refer to the REUSE metadata.
