Skip to content

johansenja/crystal_gem_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crystal Gem Template

A working* demo Ruby gem, written in Crystal.

Usage:

# Gemfile
gem "crystal_gem_template", git: "https://github.com/johansenja/crystal_gem_template.git"

then

bundle install

then

# app.rb
require 'crystal_gem_template'

include CrystalGemTemplate

hello('world') # => "hello world"

then

bundle exec ruby app.rb # => hello world

Not a lot going on here, clearly, but this opens the door for performant code written in Crystal, then used in Ruby apps, going via Ruby's C API.

Example as a functional gem:

levenshtein_str


*note: tested and used on MacOS, so probably doesn't work on Linux! (yet)

About

A working demo Ruby gem, written in Crystal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published