https://github.com/melody-rs/alox-48
Serde powered Ruby Marshal (de)serializing library
https://github.com/melody-rs/alox-48
binary-format marshal ruby rust serde serialization
Last synced: about 1 month ago
JSON representation
Serde powered Ruby Marshal (de)serializing library
- Host: GitHub
- URL: https://github.com/melody-rs/alox-48
- Owner: melody-rs
- License: mpl-2.0
- Created: 2022-12-05T19:40:43.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-12-07T04:05:24.000Z (6 months ago)
- Last Synced: 2026-03-15T02:48:37.604Z (3 months ago)
- Topics: binary-format, marshal, ruby, rust, serde, serialization
- Language: Rust
- Homepage:
- Size: 510 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# alox-48
alox-48 (short for aluminum oxide 48) is a crate for deserializing and serializing as well Ruby's Marshal data format, using a custom data format like serde.
alox-48 intends to provide almost perfect round-trip deserialization, with some exceptions:
- Object links are not preserved.
Object links are a way for Ruby to compact data in Marshal. They rely heavily on Ruby having a GC and thus do not map well to Rust.
- Bignum is unsupported.
# Why a custom data format
Originally this crate relied on nightly to extend serde, using `min_speciailization`.
Unfortunately that had many shortcomings and the deserializer would frequently choke on valid inputs and the serializer would spit out invalid data.
Most issues revolved around symbols- ruby uses `@` prefixed symbols for instance variables, but also accepts variables *without* the prefix, silently discarding them.
I'm working on a separate serde adapter that can interface serde's data format with alox's, but that looks like it'll be nightly only.