MCPcopy Index your code
hub / github.com/TaKO8Ki/frum

github.com/TaKO8Ki/frum @v0.1.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.2 ↗ · + Follow
180 symbols 359 edges 38 files 24 documented · 13% updated 4y agov0.1.2 · 2021-11-28★ 65434 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

frum

A little bit fast and modern Ruby version manager written in Rust

github workflow status crates brew aur

usage

Features

  • Pure Rust implementation not using ruby-build
  • Cross-platform support (macOS, Linux)
  • Works with .ruby-version files
  • Auto-Completion

Goals

  • Blazing-Fast Ruby Installation - built with speed in mind
  • Cross-Platform - works on macOS, Linux and (Windows)

Benchmark

eval "$(frum init)" runs about 6 times faster than eval "$(rbenv init -)".

Command Mean [ms] Min [ms] Max [ms] Relative
eval "$(rbenv init -)" 49.5 ± 2.1 46.2 57.2 6.14 ± 0.50
eval "$(frum init)" 8.1 ± 0.7 7.0 11.8 1.00 ± 0.11
eval "$(frum init)" (pre-release) 8.1 ± 0.6 7.2 11.7 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
rbenv 239628.1 ± 2030.2 237681.6 245162.6 1.04 ± 0.01
frum 232944.6 ± 1224.0 230565.4 234863.5 1.01 ± 0.01
frum (pre-release) 230366.5 ± 882.7 228454.2 232340.5 1.00

For more information, please see #16.

Installation

Homebrew (Linux/macOS)

If you’re using Homebrew or Linuxbrew, install the frum formula. For more information, please see Install Ruby with Frum written by Daniel Kehoe.

$ brew install frum

Arch Linux

If you’re using Arch Linux, install the frum-bin or frum package using your favorite AUR helper.

$ yay -S frum-bin

Cargo (Linux/macOS)

If you already have a Rust environment set up, you can use the cargo install command:

$ cargo install frum

Using a release binary (Linux/macOS)

  • Download the latest release binary for your system
  • Set the PATH environment variable
  • Configure your shell profile

Usage

Shell Setup

You need to run some shell commands before using frum. All you have to do is evaluate the output of frum init. Check out the following guides for the shell you use:

Bash

add the following to your .bashrc:

eval "$(frum init)"

Zsh

add the following to your .zshrc:

eval "$(frum init)"

Fish shell

create ~/.config/fish/conf.d/frum.fish add this line to it:

frum init | source

Options

  • --log-level: The log level of frum commands [default: info] [possible values: quiet, info, error].
  • --ruby-build-mirror: [default: https://cache.ruby-lang.org/pub/ruby].
  • --frum-dir: The root directory of frum installations [default: $HOME/.frum]. You can set frum-dir as the $FRUM_DIR environment variable. I recommend that you use the environment variable if you want to use your customized frum-dir globally.

Subcommands

  • init: Sets environment variables for initializing frum.
  • install: Installs the specified Ruby version.
    • -l, --list: Lists the Ruby versions available to install.
  • uninstall: Uninstall a specific Ruby version.
  • versions: Lists installed Ruby versions.
  • global: Sets the global Ruby version.
  • local: Sets the current Ruby version.

Ruby configuration options

Options to configure Ruby can be passed to the frum install command.

$ frum install --with-openssl-dir=<ssl_dir> # Specify the OpenSSL directory
$ frum install --with-jemalloc # Use jemalloc as allocator

You can also specify many other options that will be listed when running ./configure -h.

Contribution

Contributions, issues and pull requests are welcome!

Reference

Extension points exported contracts — how you extend this code

Command (Interface)
(no doc) [8 implementers]
src/command.rs
Shell (Interface)
(no doc) [5 implementers]
src/shell/mod.rs
Extract (Interface)
(no doc) [2 implementers]
src/archive/extract.rs

Core symbols most depended-on inside this repo

arg
called by 30
tests/utils/mod.rs
output
called by 13
tests/utils/mod.rs
versions_dir
called by 11
src/config.rs
path
called by 10
src/shell/zsh.rs
call
called by 8
src/command.rs
nice_err
called by 8
tests/utils/mod.rs
default_version_dir
called by 5
src/config.rs
current_dir
called by 5
tests/utils/mod.rs

Shape

Method 87
Function 53
Class 23
Enum 14
Interface 3

Languages

Rust100%

Modules by API surface

tests/utils/mod.rs35 symbols
src/version.rs11 symbols
src/commands/install.rs10 symbols
src/commands/completions.rs8 symbols
src/config.rs7 symbols
src/commands/local.rs7 symbols
src/shell/windows_command/mod.rs6 symbols
src/log.rs6 symbols
src/input_version.rs6 symbols
src/alias.rs6 symbols
src/shell/zsh.rs5 symbols
src/shell/powershell.rs5 symbols

For agents

$ claude mcp add frum \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact