4 releases

0.2.1 May 30, 2023
0.2.0 Mar 26, 2023
0.1.0 Mar 23, 2023
0.1.0-alpha Mar 22, 2023

#1305 in Parser implementations

27 downloads per month

Apache-2.0

66KB
1.5K SLoC

MacBinary for Rust

This crate provides utilities for reading MacBinary files and parsing resource forks commonly used on classic Mac OS.


Features

  • Parse Macbinary I, II, and III files
  • Extract individual resources by type and id from resource fork data
  • Iterate over all resources in resource fork
  • Cross-platform (does not rely on a Mac host)
  • Includes WebAssembly bindings. Used by my online MacBinary parser.
  • Supports no_std environments
  • All parsing is done without heap allocation

Building for WebAssembly

There is a Makefile that automates building for WebAssembly, it requires you have wasm-bindgen installed. Run make (or gmake on BSD) to build the artefacts. The output is put into a wasm directory.

License & Credits

Licensed under Apache License, Version 2.0 (LICENSE). The codebase incorporates binary parsing code from Allsorts and the NumFrom trait from ttf-parser.

Dependencies

~99–570KB
~11K SLoC