crystal_gem_template
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:
*note: tested and used on MacOS, so probably doesn't work on Linux! (yet)
Repository
crystal_gem_template
Owner
Statistic
- 2
- 0
- 0
- 0
- 0
- over 4 years ago
- May 6, 2020
License
Links
Synced at
Sun, 22 Dec 2024 14:49:40 GMT
Languages