Native Ruby Extensions Without Fear

Helix makes writing Ruby classes in Rust safe and fun.

#[macro_use]
extern crate helix;

ruby! {
    class Console {
        def log(string: &str) {
            println!("LOG: {:?}", string);
        }
    }
}
$ irb
>> require "console"
>> Console.log("I'm in your Rust")
LOG: "I'm in your Rust"
Ferris Tiny ruby Ferris Tiny ruby Ferris Tiny ruby Ferris Tiny ruby Ferris

BLAZING FAST

Helix lets you offload performance-critical code to Rust without leaving your Ruby workflow.

class CountWordsController < ApplicationController
  def index
    # WordCount is written in Rust
    render json: {
      count: WordCount.search("shakespeare-plays.txt", "thee")
    }
  end
end

USE RUST LIBRARIES

Easily use all of the production-ready crates on crates.io right inside your Rails app.

// import scraper, which uses HTML and CSS
// libraries built for Servo
extern crate scraper;

ruby! {
  class ScrapeHN {
    def scrape(url: String) -> String {
      // TODO
    }
  }
}

CREATE POPULAR APPS

Make your own apps that inspire millions of satisfied users such as YouTube to mp3 converter.

Ruby rust hi five