https://github.com/wezm/macbinary
MacBinary and resource fork reading in Rust
https://github.com/wezm/macbinary
classic-mac-os macbinary no-std retro-computing rust vintage-macintosh-computers wasm
Last synced: 12 months ago
JSON representation
MacBinary and resource fork reading in Rust
- Host: GitHub
- URL: https://github.com/wezm/macbinary
- Owner: wezm
- License: apache-2.0
- Created: 2023-03-22T08:23:42.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-03T23:45:27.000Z (about 1 year ago)
- Last Synced: 2025-02-28T14:11:38.396Z (about 1 year ago)
- Topics: classic-mac-os, macbinary, no-std, retro-computing, rust, vintage-macintosh-computers, wasm
- Language: Rust
- Homepage: https://7bit.org/macbinary/
- Size: 76.2 KB
- Stars: 12
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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][7bit-macbinary].
* 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](LICENSE)). The codebase incorporates
binary parsing code from [Allsorts](https://github.com/yeslogic/allsorts) and the
`NumFrom` trait from [ttf-parser].
[7bit-macbinary]: https://7bit.org/macbinary/
[ttf-parser]: https://github.com/RazrFalcon/ttf-parser/blob/eb6823889302cc55d40ae09c583c5f51324bdf44/src/parser.rs#L160