Serde powered Ruby Marshal (de)serializing library
  • Rust 99.9%
  • Ruby 0.1%
Find a file
2025-12-07 15:02:33 +11:00
.github/workflows refactor: 🚧 WIP 2023-07-03 21:57:20 -07:00
.vscode Relicense under mpl 2024-05-29 17:04:13 -07:00
alox-48 fix warnings 2025-12-07 15:02:33 +11:00
alox-48-derive Fix a really stupid bug 2024-05-31 18:00:10 -07:00
.gitignore Fix the value example 2023-01-02 20:49:37 -08:00
Cargo.toml Move to virtual workspace 2023-12-03 09:01:10 -08:00
LICENSE Relicense under mpl 2024-05-29 17:04:13 -07:00
README.md Fix up things 2024-05-29 17:00:36 -07:00

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.