Skip to content

Version 2.0

Latest

Choose a tag to compare

@NiceneNerd NiceneNerd released this 29 Nov 02:24
· 5 commits to master since this release

This release catches up on things I've wanted to do for a long time: port the Yaz0 features to pure Rust, add zero copy parsers for AAMP and BYML, and properly support no_std (specifically working on target aarch64-nintendo-switch-freestanding for Switch support). Along the way, several other things have been improved.

This update was largely constructed with AI agents. Since I built roead originally by hand and had a strong notion of exactly what I wanted to do with this release and how it should work, plus I already had pretty good tests in place, I think it can be trusted. If you disagree, feel free to stick with v1.0, which was still perfectly good. But you'll be missing out on some massive performance benefits. The new zero copy readers and the new Yaz0 implementation are both quite speedy.

Added

  • Zero-copy, no_std-compatible borrowed readers for AAMP and BYML
  • SARC now accepts owned Vec<u8> and Cow<[u8]> input with alloc, including automatic Yaz0 decompression with alloc + yaz0, even in no_std
  • AAMP name algorithm rewritten to be much, much faster
  • NameTable::get_name and iter_by_name now return NameRef

Changed

  • Updated to edition 2024 and MSRV 1.88
  • Ported yaz0 from C++ to Rust
  • Migrated YAML parsing and emission to the native Rust ryml 0.4 crate, eliminating the C++/cxx build requirement. Some tiny changes come with this to string quoting.
  • Split core, alloc, and std feature levels. Owned BYML construction macros and string indexing are available in no_std + alloc configurations
  • Owned BYML maps now use hashbrown::HashMap with FxBuildHasher
  • The SARC writer now compiles resource factory and AGL tables into binary instead of parsing them at runtime

Removed

  • Removed the serde_json, num-integer, and parking_lot dependencies

Fixed

  • Fixed the BYML array!(value; count) macro to repeat value count times
  • Fixed AAMP BufferF32 element counts to read from data_offset - 4, matching the writer and other numeric buffer types
  • Improved validation of binary bounds, offsets, UTF-8, recursion depth, and truncated data
  • Made FixedSafeString operations preserve UTF-8 safely
  • Fixed SARC alignment requirements being overwritten by the default requirements every time an archive is written
  • Prevented AAMP parameter-data deduplication from mixing buffers and inline values with incompatible on-disk shapes
  • Guaranteed the 128-byte C layout of Curve values
  • SARC file equality now compares only the file entry, not its entire backing archive