Introducing Roast: Structured AI workflows made easy
Roast is Shopify's open-source, Ruby-based CLI framework for orchestrating structured AI workflows.
Topics Languages
Ruby or Ruby on Rails.
Roast is Shopify's open-source, Ruby-based CLI framework for orchestrating structured AI workflows.
YJIT, Shopify's JIT compiler for CRuby, became production-ready in Ruby 3.2 after a port from C99 to Rust and a cut in memory overhead to about a third of Ruby 3.1 levels.
Ruby's 2022 highlights include YJIT's rewrite in Rust and its new ARM support, so `ruby --yjit` now runs on Apple Silicon development machines as well as production.
JITs can beat ahead-of-time compilers for highly dynamic languages like Ruby because they can compile code under speculative assumptions, such as that Integer#+ hasn't been redefined, and throw that code away (de-optimize) when an assumption breaks.
YJIT is a new JIT compiler built inside CRuby by Shopify and GitHub engineers, based on Basic Block Versioning, and aimed at real-world workloads like Rails where the GCC-based MJIT has struggled.
Shopify's Rails monolith relies on a set of in-house patterns: the dev CLI for consistent environment setup, a podded architecture that shards the full infrastructure stack by shop, and domain-driven components that share a single database with no database-level foreign keys.