12 unstable releases (4 breaking)

0.6.0 Jun 13, 2024
0.5.0 May 31, 2024
0.4.2 Dec 3, 2023
0.4.1 Jul 27, 2023
0.1.3 Feb 13, 2023

#1560 in Parser implementations

Download history 38/week @ 2025-06-18 23/week @ 2025-06-25 9/week @ 2025-07-02 32/week @ 2025-07-09 31/week @ 2025-07-16 79/week @ 2025-07-23 9/week @ 2025-07-30 39/week @ 2025-08-20 44/week @ 2025-08-27 48/week @ 2025-09-03 34/week @ 2025-09-10 18/week @ 2025-09-17 28/week @ 2025-09-24 32/week @ 2025-10-01

120 downloads per month
Used in 9 crates (3 directly)

MPL-2.0 license

220KB
6K SLoC

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.

Dependencies

~1–1.9MB
~36K SLoC