Zeitwerk: A new code loader for Ruby
summary
Zeitwerk is a gem that replaces classic autoloader in Rails 6 and actually implements module-based autoloading, eager loading and optional reloading with a small memory footprint and no dependencies. It wires autoloads from files, uses absolute paths, and handles namespaces by defining dummy modules and registering loaders; implementation uses TracePoint and intercepted require hacks plus modest Ruby changes; Rails 6 integrates it automatically and it works thread‑safely. no dependencies, pure Ruby API
AI-written summary · about
chapters (11)
- 0:00Intro
- 1:05Main features
- 3:34Project structure
- 15:08Require
- 15:42Global Side Effect
- 19:15Constants
- 26:00Nesting
- 33:08Autoloading
- 39:46Module Autoloading
- 41:21Modulo to Log
- 53:53Integration
related talks
57mZeitwerk Internals
34mZeitwerk Internals
45mClass Reloading in Ruby on Rails: The Whole Story
44mrequire() bombed my multi-threaded app!
47mConstant autoloading in ruby on rails
33mTutorialKit.rb: interactive Ruby gem docs powered by Wasm
29mHow to Load 1m Lines of Ruby in 5s
31mRuby Archaeology: Forgotten web frameworks
