go-ruby-cancancan documentation¶
Pure-Go, MRI-4.0.5-faithful Ruby cancancan (no cgo)
go-ruby-cancancan/cancancan is a faithful, pure-Go (zero cgo) reimplementation of Ruby's cancancan,
matching reference Ruby (MRI) behaviour. The module path is
github.com/go-ruby-cancancan/cancancan.
It is a standalone, reusable library importable by any Go program, and the
backend bound into go-embedded-ruby
by rbgo as a native module — the same pattern as
go-ruby-yaml. The dependency runs the
other way: this library has no dependency on the Ruby runtime.
Status: pure-Go, CGO=0, differential-tested
A faithful pure-Go port of Ruby's cancancan, validated against reference Ruby, at 100%
coverage, gofmt + go vet clean, CI green across the six 64-bit Go targets
and three OSes.
Install¶
Repositories¶
| Repo | What it is |
|---|---|
cancancan |
the library — Ruby's cancancan in pure Go |
docs |
this documentation site (MkDocs Material, versioned with mike) |
go-ruby-cancancan.github.io |
the organization landing page (Hugo) |
brand |
logo and brand assets |
Principles¶
- Pure Go,
CGO_ENABLED=0— trivial cross-compilation, a single static binary, no C toolchain. - Reference-faithful. Behaviour matches reference Ruby (MRI), validated by a differential oracle rather than approximated.
- Standalone & reusable. No dependency on the Ruby runtime — the dependency
runs the other way;
rbgobinds this module. - 100% test coverage is the target, enforced as a CI gate, across 6 arches.
Where to go next¶
- Why pure Go — why this slice of Ruby lives as a standalone, interpreter-independent Go library.
- Reference — install, import path and the API reference.
Source lives at github.com/go-ruby-cancancan/cancancan.