Status
Carton is experimental, and so is Ruby::Box. It targets Ruby 4.0.7 or later and, with Bundler, Bundler 4.0.23 or later.
| Need | Status |
|---|---|
| Units with a private interior | Done. Only an Entrypoint can be imported, only exports cross, and private_constant hides the rest. |
| Imports bound where they are used | Done. import returns a value and defines nothing in the importer. |
| Gem versions per unit | Done. Carton.setup_bundle gives a Carton its own bundle, and Gem Cartons get the importer’s versions. A shared Carton keeps its First Importer’s versions. |
| Contained side effects | Partly. Patches to builtins stay in their Carton, but exported classes are shared and can be reopened. |
| Declared dependencies | Partly. A Gem Carton’s gemspec declares them and carton check reports Undeclared Gems, but the runtime gives it the importer’s whole lockfile. |
| Graph tooling | Partly. carton check and carton rbs exist; a dependency graph and a baseline file do not. |
| Distribution | Done by design. A Carton is gem-shaped, and each Carton in a monorepo is a path gem. |
| Public sub-entrypoints | Missing. Only the Entrypoint can be imported. |
| Cheap enough for many units | Missing. About 60 ms and 2.4 MB per Carton, most of it Ruby::Box.new, so tens of Cartons, not hundreds. |
| Works with Rails | Partly. Rails in the Main Box works; Rails inside Cartons has no supported reloading or Rails CLI. |
| On by default | Missing. Ruby needs RUBY_BOX=1, and Ruby::Box is experimental. |
The model fits. The biggest gaps are cost, Rails inside Cartons, and Box’s experimental status. Ruby itself would close most of the cost gap, through cheaper Boxes, template Boxes, and Boxes started from a resolved load path.
The repository’s design notes, performance numbers, and TODO have the details.
