Sorbet

Sorbet

  • Get started
  • Docs
  • Try
  • Community
  • GitHub
  • Blog

›Recent Posts

Recent Posts

  • Tapioca is the recommended way to generate RBIs for Sorbet
  • Open-sourcing the Sorbet VS Code Extension
  • Sorbet Compiler: An experimental, ahead-of-time compiler for Ruby
  • Types in Ruby 3, RBS, and Sorbet
  • Announcing Sorbet 0.5

Tapioca is the recommended way to generate RBIs for Sorbet

July 27, 2022

Jake Zimmerman

Jake Zimmerman

Today we’re excited to announce that the Sorbet team officially recommends using Shopify’s Tapioca gem for RBI generation in projects that use Sorbet. Tapioca takes the place of the srb rbi family of commands, which as of today are officially in maintenance mode. Sorbet itself remains in active development.

Read More

Open-sourcing the Sorbet VS Code Extension

January 6, 2022

We’re excited to announce that Stripe’s VS Code extension for Sorbet is now open source. We’ve designed Sorbet to be used in editors from Day 1—For the past two years, Sorbet has exposed a flag (--lsp) that starts Sorbet in Language Server Protocol (LSP) mode. In this mode, Sorbet can respond to many LSP requests, like Go To Definition, Find All References, Autocomplete, and more.

With this release, we’re making it even easier to take advantage of these LSP features when working with Sorbet in VS Code. We hope that this extension takes some of the guess work out of how to configure and use Sorbet’s LSP mode.

Read More

Sorbet Compiler: An experimental, ahead-of-time compiler for Ruby

July 30, 2021

For the past year, the Sorbet team has been working on an experimental, ahead-of-time compiler for Ruby, powered by Sorbet and LLVM. Today we’re sharing the source code for it. It lives alongside the existing code for Sorbet on GitHub, mostly in the compiler/ folder:

→ https://github.com/sorbet/sorbet/tree/master/compiler/

We want to be clear up front: the code is nowhere near ready for external use right now, but we welcome you to read the code and give us feedback on our approach!

We teased this a few weeks back in a tweet, which drew a fair bit of attention, and also a lot of questions:

Read More

Types in Ruby 3, RBS, and Sorbet

July 30, 2020

Jake Zimmerman

Jake Zimmerman

Yesterday Square posted an article to their blog introducing RBS (Ruby Signature), a type syntax format for Ruby 3.

We’d like to take a second to speak to how RBS relates to Sorbet. The short version: Sorbet will happily incorporate RBS as a way to specify type annotations, in addition to the existing syntax Sorbet supports. Stripe still has a very strong commitment to Sorbet’s continued progress and success. While the Ruby core team has been working on syntax, we’ve been working on features that build on top of that syntax.

With that in mind, I’d love to start a discussion of some of the finer points of what this announcement means for Ruby, and for Sorbet.

Read More

Announcing Sorbet 0.5

December 20, 2019

Jake Zimmerman

Jake Zimmerman

Today we’re excited to celebrate six months since Sorbet’s open source release!

Sorbet is a fast, powerful type checker for Ruby developed by Stripe and an ever-growing community of contributors. You can try it online or set it up in your project today. Sorbet gradually integrates into existing Ruby projects. With Sorbet, people writing Ruby gain more confidence in their changes and get faster feedback while iterating.

At this milestone, we’d like to take a look back on what’s happened since the first public release of Sorbet, and what’s coming in the future.

Read More

Open-sourcing Sorbet: a fast, powerful type checker for Ruby

June 20, 2019

We’re excited to announce that Sorbet is now open source and you can try it today. Sorbet is a fast, powerful type checker designed for Ruby. It scales to codebases with millions of lines of code and can be adopted incrementally.

We designed Sorbet to be used at Stripe, where the vast majority of our code is written in Ruby. We’ve spent the last year and a half developing and adopting Sorbet internally, and we’re finally confident that Sorbet is not just an experimental, internal project—we’re ready to share Sorbet with the entire Ruby community. In fact, we’ve had more than 30 companies beta test Sorbet and provide feedback.

Read More

State of Sorbet Spring 2019

May 16, 2019

James Iry

Stripe uses Ruby extensively[1]. It’s the main language we use to build the business logic behind our APIs, and our Ruby codebase is on the order of millions of lines of code. At that scale and with our expected rapid growth rate two things are true: 1) we need all the tooling help we can get to understand and modify that much code, and 2) a total rewrite in a statically typed language would be a massive undertaking.

With that in mind, in October 2017 a small team of engineers conceived of building Sorbet, a gradual static type system for Ruby. Static type systems look for certain classes of potential errors without running your code. A gradual static type system allows you to gradually add static typing, leaving some parts of your code purely dynamically typed. Other examples of gradual static type systems that have been added onto existing dynamically typed languages are Flow and TypeScript for Javascript, and Hack for PHP. In this post, we’d like to give a brief update about what we’ve been working on, and where we’re going next.


  1. We also use plenty of of other languages including Go for infrastructure tasks, Scala for data wrangling, and JavaScript for client-side work. ↩

Read More

Get started · Docs · Try · Community · Blog · Twitter