Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Crystal
  3. anyolite

anyolite

MITCrystalv1.1.1

Embed mruby or Ruby interpreters into Crystal projects to use Ruby as a scripting language with similar syntax.

Visit WebsiteGitHubGitHub
178 stars10 forks0 contributors

What is anyolite?

Anyolite is a Crystal shard that integrates a fully functional mruby or Ruby interpreter into Crystal, allowing Crystal classes and functions to be wrapped and exposed to Ruby. It enables Ruby to serve as a scripting language for Crystal applications, leveraging their syntactic similarities for seamless interoperability.

Target Audience

Crystal developers who want to embed Ruby as a scripting language in their applications, particularly for scenarios like game development (e.g., RPGs), configuration scripting, or extending functionality with user-defined scripts.

Value Proposition

Developers choose Anyolite for its minimal boilerplate syntax, garbage collector safety, and flexibility in handling complex data types like structs and enums across languages, making it easier to bridge Crystal and Ruby compared to manual bindings.

Overview

Embedded mruby/Ruby for Crystal

Use Cases

Best For

  • Embedding Ruby scripting into Crystal-based game engines or RPG frameworks.
  • Adding configuration or modding support to Crystal applications via Ruby scripts.
  • Wrapping Crystal libraries for use in Ruby environments with minimal code changes.
  • Prototyping or extending Crystal applications with dynamic Ruby code at runtime.
  • Integrating Ruby's ecosystem (e.g., gems) into performance-critical Crystal projects.
  • Creating hybrid applications where Crystal handles core logic and Ruby manages user-facing scripts.

Not Ideal For

  • Applications requiring zero runtime overhead and maximum performance, as the Ruby interpreter adds latency.
  • Teams on Windows needing full MRI Ruby support, since it's not currently functional on that OS.
  • Projects with strict dependency management, due to the complex build process involving Ruby, Rake, Git, and a C compiler.
  • Developers needing splat arguments or arbitrary keyword passing in Ruby bindings, as these are on the wishlist and not yet implemented.

Pros & Cons

Pros

Minimal Boilerplate Syntax

The README demonstrates wrapping a Crystal class with just a few lines using `Anyolite.wrap`, emphasizing 'easy syntax without unnecessary boilerplate code.'

Garbage Collector Safety

Includes a simple system to prevent conflicts between Crystal and Ruby garbage collectors, ensuring safe cross-language memory management as highlighted in the features.

Flexible Data Type Support

Supports objects, arrays, hashes, structs, enums, and unions as function arguments and return values, allowing complex data interchange without manual conversion.

Annotation-Based Customization

Methods and constants can be excluded, modified, or renamed with annotations, providing fine-grained control over the Ruby interface as described in the features.

Script Compilation Options

Offers options to compile Ruby scripts directly into the executable, enabling standalone distribution without external script files, a key feature mentioned in the README.

Cons

Complex Build Setup

Requires installation of Ruby, Rake, Git, and a C compiler (GCC or MSVC), making the initial setup more involved than typical Crystal shards, as noted in the prerequisites.

Upcoming Breaking Changes

Version 2.0.0 will introduce breaking changes to the API and build process, necessitating migration efforts, which is explicitly warned in the roadmap.

Limited Windows MRI Support

MRI support on Windows does not currently work, restricting the use of regular Ruby in Windows environments, as admitted in the roadmap's limitations.

Missing Advanced Features

Features like splat arguments, slices support, and bignum are on the wishlist but not yet implemented, limiting some Ruby functionalities for advanced use cases.

Frequently Asked Questions

Quick Stats

Stars178
Forks10
Contributors0
Open Issues1
Last commit4 months ago
CreatedSince 2020

Tags

#crystal-shard#embedded-scripting#language-binding#ruby-interpreter#interoperability#crystal#scripting#crystal-language#scripting-language#mruby#ruby

Built With

M
Microsoft Visual Studio
G
GCC
R
Ruby
R
Rake
g
git
C
Crystal
m
mruby

Links & Resources

Website

Included in

Crystal3.5k
Auto-fetched 1 day ago

Related Projects

immutableimmutable

Thread-safe, persistent, immutable collections for the Crystal language

Stars203
Forks11
Last commit5 years ago
crzcrz

Functional programming library for https://github.com/crystal-lang/crystal

Stars94
Forks6
Last commit5 years ago
crystal-web-framework-starscrystal-web-framework-stars

⭐️ Web frameworks for Crystal, most starred on Github

Stars76
Forks3
Last commit5 days ago
lua.crlua.cr

Crystal to Lua bridge

Stars70
Forks9
Last commit2 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub