ruby_exts
Version, currently master branch1 version
- master branchlatestDec 4, 2016
github.com/spalladino/crystal-ruby_exts
Writing ruby extensions in Crystal
5 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
ruby_exts:
github: spalladino/crystal-ruby_exts
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.20.0- License
- MIT
- Author
- Santiago Palladino
Dependencies
This version declares no dependencies.
README
ruby_exts
Write Ruby extensions in Crystal. Built from this gist, based upon manastech/crystal_ruby.
Works with Crystal 0.20.0 and Ruby 2.3.1 on OSX El Capitan, though might work for other versions.
Work in progress.
Installation
Add this to your application's shard.yml:
dependencies:
ruby_exts:
github: spalladino/ruby_exts
Sample
Run an irb with the contents of samples/sample.cr with make irb:
$ make irb
irb(main):001:0> coco = Coco.new("3")
=> #<Coco:0x007ff0b3039840>
irb(main):002:0> coco.size
=> 3
irb(main):003:0> get "https://raw.githubusercontent.com/manastech/crystal_ruby/master/README.md"
=> "crystal_ruby\n============\n\nWrite Ruby extensions in Crystal. This is just a [Proof of Concept](http://en.wikipedia.org/wiki/Proof_of_concept).\n"
Usage
Coming soon.
TODO
- [ ] Write usage documentation
- [ ] Define macros for writing Ruby classes
- [ ] Handle inheritance and Crystal generics when being exposing as Ruby classes
- [ ] Handle Crystal exceptions and rethrow them as Ruby exceptions
- [ ] Support multiple versions of Ruby
- [ ] Linux support
- [ ] Handle invocations from a non-main Ruby thread
Contributing
- Fork it ( https://github.com/spalladino/ruby_exts/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- spalladino Santiago Palladino - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Dec 4, 2016
- Crystal
0.20.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/spalladino/crystal-ruby_exts
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 12, 2026
- Synced
- Aug 12, 2026
- Versions
- 1