opal-rails is a Rails engine that integrates the Opal Ruby-to-JavaScript compiler into the Rails asset pipeline. It provides a build-based workflow where Opal entrypoints (Ruby files) are compiled into JavaScript assets via Rake tasks (`opal:build`, `opal:watch`, `opal:clobber`), replacing the older Sprockets request-time compilation. The gem includes generators for initial setup and asset scaffolding, a template handler for `.js.opal` views with optional controller assigns, and Haml/Slim filters for inline Opal code. It hooks into Rails' `assets:precompile` and test preparation tasks to ensure Opal assets are built automatically. The architecture is centered around a `BuilderRunner` that wraps `Opal::Builder`, an `OutputsManifest` that tracks built files, and a `WatchRunner` that uses the `listen` gem for incremental rebuilds during development. The codebase is well-structured with clear separation of concerns, dependency injection, and comprehensive test coverage, making it a solid example of a Rails engine that extends the asset pipeline.