#file-format #nintendo #yaz0 #yaml #sarc #byml #aamp

roead

Rust port of oead C++ library for common Nintendo formats

49 releases (1 stable)

1.0.0 Aug 17, 2024
0.25.3 Jun 24, 2024
0.25.1 Apr 7, 2024
0.23.1 Jun 12, 2023
0.9.0 Nov 18, 2021

#172 in Game dev

Download history 92/week @ 2024-07-27 88/week @ 2024-08-03 66/week @ 2024-08-10 228/week @ 2024-08-17 118/week @ 2024-08-24 68/week @ 2024-08-31 68/week @ 2024-09-07 123/week @ 2024-09-14 102/week @ 2024-09-21 126/week @ 2024-09-28 65/week @ 2024-10-05 75/week @ 2024-10-12 52/week @ 2024-10-19 74/week @ 2024-10-26 80/week @ 2024-11-02 50/week @ 2024-11-09

261 downloads per month
Used in 2 crates

GPL-3.0-or-later

1MB
18K SLoC

C 12K SLoC // 0.2% comments Rust 6K SLoC // 0.0% comments C++ 126 SLoC // 0.2% comments Shell 23 SLoC // 0.1% comments

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 (up to v7 in roead).
  • 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 release. The stable MSRV is 1.69. 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.

Dependencies

~0.4–25MB
~363K SLoC