Crate roead

source ·
Expand description

§roead

crates.io api license build

§A Rusty child of the oead C++ library

oead is a C++ library for common file formats that are used in modern first-party Nintendo EAD (now EPD) titles.

Currently, oead only handles very common formats that are extensively used in recent games such as Breath of the Wild and Super Mario Odyssey.

  • AAMP (binary parameter archive): Only version 2 is supported.
  • BYML (binary YAML): Versions 2, 3, and 4 are supported.
  • SARC (archive)
  • Yaz0 (compression algorithm)

The roead project brings oead’s core functionality, by directly porting or (for the yaz0 module) providing safe and idiomatic bindings to oead’s features. (The Grezzo datasheets are not supported.) For more info on oead itself, visit its GitHub repo.

Each of roead’s major modules is configurable as a feature. The default feature set includes byml, aamp, sarc, and yaz0. For compatibility with many existing tools for these formats, there is also a yaml feature which enables serializing/deserializing AAMP and BYML files as YAML documents. Finally, serde support is available using the with-serde feature.

For API documentation, see the docs for each module.

§Building from Source

Most of roead is pure Rust and can compiled with any relatively recent nightly release. However, the yaz0 module provides FFI bindings to oead code, so to use it the following additional requirements are necessary:

  • CMake 3.12+
  • A compiler that supports C++17
  • Everything necessary to build zlib

First, clone the repository, then enter the roead directory and run git submodule update --init --recursive.

§Contributing

Issue tracker: https://github.com/NiceneNerd/roead/issues
Source code: https://github.com/NiceneNerd/roead

This project is licensed under the GPLv3+ license. oead is licensed under the GPLv2+ license.

Modules§

  • aampaamp
    Port of the oead::aamp module.
  • bymlbyml
    Port of the oead::byml module.
  • sarcsarc
    Port of the oead::sarc module.
  • Miscellaneous needful oead types.
  • yaz0yaz0
    Bindings for the oead::yaz0 module, which supports Yaz0 decompression and fast compression (using syaz0).

Macros§

  • arraybyml
    Convenience macro to construct a Byml array using array literal syntax. Example:
  • haamp
    A convenient macro for hashing AAMP names. This can help ensure they are hashed at compile time in contexts where the compiler may not otherwise realize it is an option.
  • listsaamp
    Convenience macro to construct a ParameterListMap with map literal syntax. Example:
  • mapbyml
    Convenience macro to construct a Byml map using map literal syntax. Example:
  • objsaamp
    Convenience macro to construct a ParameterObjectMap with map literal syntax. Example:
  • paramsaamp
    Convenience macro to construct a ParameterObject with map literal syntax. Example:

Enums§

  • Represents endianness where applicable.
  • Error type for this crate.

Type Aliases§