- 32bit to 64bit (reverse) conversion of hkx.
- XML to 32bit/64bit hkx (reverse) conversion.
- Display of hkx/XML reference dependency tree.
- Output logs that make it possible to determine the binary data location of hkx.
- Hexdump the binary data of hkx.
- Display data differences between two hkx/XML.
./hkxc --helpgit clone https://github.com/SARDONYX-sard/serde-hkx.git;
cd ./serde-hkx && cargo build --release-lto;NOTE: Currently there is a stack overflow problem of unknown cause.
This occurs with debug build (cargo build) but not with release (cargo build --release).
According to this CAO issue report, it was found that passing through a function (fn) can prevent stack overflow without requiring Classes to be wrapped in Box. Thank you. (I made the changes using a macro and have verified that they actually work.)
# in Cargo.toml
tokio = { version = "1.41.0", features = ["full"] } # Async runtime
serde_hkx_features = { git = "https://github.com/SARDONYX-sard/serde-hkx", tag = "2.0.0" }use serde_hkx_features::{convert, Format, Result};
use std::path::PathBuf;
#[tokio::main]
async fn main() -> Result<()> {
let input = "./defaultmale.hkx"; // file or dir path
let out_fmt = Format::Xml; // Format::Xml, Format::Amd64, Format::Win32
let output: Option<PathBuf> = None; // `None` is same as input. Or `Some("./output/defaultmale.xml".into())`
convert(input, output, out_fmt).await
}# in Cargo.toml
havok_classes = { git = "https://github.com/SARDONYX-sard/serde-hkx", tag = "2.0.0" }
serde_hkx = { git = "https://github.com/SARDONYX-sard/serde-hkx", tag = "2.0.0" }-
When using C or other languages (FFI)
1.First build serde_hkx_ffi.
cargo build -p serde_hkx_ffi --release # output: <repo root>/target/release/serde_hkx_ffi.lib2.See C Example
The only way to find out if it is possible or not is to try it out.
- XML Serializer
- XML Deserializer
- Bytes Serializer
- Bytes Deserializer
- Generate Havok Classes
- Testing the API & CI.
- Modify the code based on the test data.
cli/gui
└── serde_hkx_features
├── havok_classes <- (generated by class_generator)
│ ├── havok_serde
│ │ └── havok_types
│ ├── havok_types
│ └── havok_types_derive
│ └── havok_types_derive_proc_macros
└─ serde_hkx
├── havok_serde
└── havok_types