Skip to content
@go-ruby-marshal

go-ruby-marshal

go-ruby-marshal

go-ruby-marshal

Ruby's Marshal in pure Go — byte-exact dump/load, no cgo.

🌐 Website · 📚 Documentation

Docs License: BSD-3-Clause Go 1.26.4+ Coverage 100%


go-ruby-marshal is a pure-Go (no cgo) implementation of Ruby's Marshal binary serialization — the format Marshal.dump and Marshal.load use to round-trip Ruby objects. It speaks Marshal wire format v4.8 and is byte-for-byte identical to MRI Ruby 4.0.5: it reproduces the Fixnum/Bignum split, MRI's shortest-float formatting, the symbol table and the object-link table, so shared objects and cycles serialize and round-trip exactly as the reference interpreter does.

It is standalone and reusable over its own typed value model (Nil / Bool / Int / Float / Symbol / Str / Array / Hash), and is the serialization member of the go-ruby-* family — alongside go-ruby-parser and go-ruby-regexp — that go-embedded-ruby builds on.

Repositories

Repo What it is
marshal the library: Marshal.dump / Marshal.load for the Ruby Marshal v4.8 wire format over a typed value model (Nil/Bool/Int/Float/Symbol/Str/Array/Hash), byte-exact against MRI

Principles

  • Pure Go, zero cgo. Cross-compiles and embeds anywhere; a static binary by default.
  • MRI byte-exact. The integer encoding (Fixnum/Bignum split), shortest-float formatting, symbol table and object-link table all match the reference interpreter — dump output is identical and load round-trips.
  • Shared objects & cycles. The object-link table makes references and cyclic structures serialize and reload faithfully.
  • Standalone & reusable. No dependency on the Ruby runtime.
  • 100% test coverage is the target, enforced as a CI gate, green across 6 arches.

Status

A complete Marshal v4.8 codec — dump / load over the typed value model, differential-tested against MRI Ruby 4.0.5 so output is byte-for-byte identical, with the Fixnum/Bignum split, shortest-float formatting, symbol table and object-link table (shared objects and cycles round-trip). 100% coverage, CI green across 6 arches.

BSD-3-Clause.

Popular repositories Loading

  1. brand brand Public

    Brand assets — logos & icons

  2. marshal marshal Public

    Pure-Go (CGO=0) Ruby Marshal binary serialization — MRI-byte-exact Marshal.dump/load (v4.8)

    Go

  3. .github .github Public

    Organization profile, defaults and shared config for go-ruby-marshal

  4. go-ruby-marshal.github.io go-ruby-marshal.github.io Public

    Landing page for the go-ruby-marshal organization

    HTML

  5. docs docs Public

    Documentation site for go-ruby-marshal/marshal (MkDocs Material, mike-versioned).

    Go

Repositories

Showing 5 of 5 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…