Efficient and thread-safe code loader for Ruby
25-Jan-2019 1766
Zeitwerk is an efficient and thread-safe code loader for Ruby.Given a conventional file structure, Zeitwerk loads your project's classes and modules on demand. You don't need to write require calls for your own files, rather, you can streamline your programming knowing that your classes and modules are available everywhere. This feature is efficient, thread-safe, and matches Ruby's semantics for constants.The library is designed so that each gem and application can have their own loader, independent of each other. Each loader has its own configuration, inflector, and optional logger.Zeitwerk is also able to reload code, which may be handy for web applications. Coordination is needed to reload in a thread-safe manner. The documentation below explains how to do this.Finally, in some production setups it may be optimal to eager load all code upfront. Zeitwerk is able to do that too.
Efficient and thread-safe code loader for Ruby #ruby #rubydeveloper #rubyonrails #Efficient #thread-safe #loader #code #thread-safe https://www.rubyonrails.ba/link/efficient-and-thread-safe-code-loader-for-ruby