A Ruby version manager written in Rust, which is 7 seconds faster than rbenv

  • 11:25 - 11:50 (JST)

    • Session Language: 日本語
    • Caption Language: English

I built a Ruby version manager with Rust, which is 7 seconds faster than rbenv. In detail, it takes about 7 seconds faster to install a particular version and set it with frum than rbenv.

Ruby has a lot of code that depends on the runtime version. Therefore, it is important to manage Ruby versions. However, it takes 2 to 3 minutes to run rbenv install, depending on the environment, and waiting for this to happen every time you install a new version is inefficient. The main bottleneck is a command-line utility called ruby-build, which makes it easy to install virtually any version of Ruby. In order to solve this problem, I created a Pure Rust Ruby version manager called frum.

In this talk, I will share my efforts to build a simple and easy to use Ruby version manager with Rust, and what I learned in the process of making frum like the following things.

  • Tips on good E2E testing a CLI that manipulates files using declarative macros
  • Tips for writing a CLI with multiple subcommands in Rust
  • How to use the command line parser clap to implement flexible command-line completion

Share it on


Bio

Takayuki Maeda

Takayuki Maeda

I am a maintainer of frum, a Ruby version manager written in Rust, and awesome-alternatives-in-rust, and I'm majoring in Civil Engineering at Kobe University. I've been building a TUI SQL client with Rust lately.

Copyright © Rust.Tokyo 2021 all rights reserved.


特定商取引法に基づく表示

Twitterもぜひフォローしてください! @rustlang_tokyo

お問い合わせ: rust-tokyo-staff@googlegroups.com

過去の開催