awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
mruby avatar

mruby/mruby

0
View on GitHub↗
5,584 stars·838 forks·C·MIT·10 views

Mruby

mruby is a lightweight Ruby interpreter designed to be embedded into C applications. It compiles Ruby source code into a compact, platform-independent bytecode that executes on a register-based virtual machine, and exposes a stable C API for host programs to initialize the interpreter, load bytecode, and invoke Ruby methods at runtime.

The interpreter distinguishes itself through a tightly coupled parser and compiler that performs lexical analysis, syntax parsing, and bytecode generation in a single pass without constructing an intermediate AST, minimizing memory overhead. It also includes a gems packaging system that organizes C extensions and Ruby libraries into versioned packages with metadata files for runtime loading and resolution, and a single-file build system that assembles all interpreter source and headers into one C file and one header for trivial integration into other projects.

The project covers the full pipeline of translating Ruby source into portable bytecode, packaging extensions as gems, and distributing a minimal runtime for resource-constrained environments. Its documentation and build surface are centered around the single-file library distribution, which simplifies inclusion in host projects without complex build steps.

Features

  • Bytecode Interpreters - An embeddable interpreter that compiles Ruby source code into portable bytecode for execution in C applications.
  • Source-to-Bytecode Compilers - Compiles Ruby source files into portable bytecode that any compatible interpreter can load and run.
  • C-Based Embedding APIs - Exposes a stable C interface for host applications to initialize the interpreter, load bytecode, and invoke Ruby methods.
  • Embedded Script Execution - Links the library into a C application so it can execute Ruby scripts at runtime.
  • Embedded Scripting Engines - A C library that links into host programs to run Ruby scripts at runtime without a separate runtime environment.
  • Register-Based Bytecode - Uses a fixed set of virtual registers instead of a stack to execute bytecode, reducing instruction count and improving speed.
  • Scripting Runtimes - Adds a lightweight Ruby interpreter to a C application so it can run user-defined scripts at runtime.
  • Single-File Libraries - Ships a single-file C library distribution for trivial integration into host projects.
  • Single-File C Library Builds - Assembles all interpreter source and headers into one C file and one header for trivial integration into other projects.
  • Ruby Gem Packaging - Organises C extensions and Ruby libraries into versioned packages with metadata files for runtime loading and resolution.
  • Single-Pass Compilation - Combines lexical analysis, syntax parsing, and bytecode generation into a single pass without intermediate AST construction.
  • Cross-Platform Compilers - Compiles Ruby source code into portable bytecode that runs on any platform with a compatible interpreter.
  • Minimal Ruby Distributions - Packages a stripped-down Ruby runtime for resource-constrained environments like embedded systems or IoT devices.
  • Compile-Time Code Generation - Translates Ruby source into bytecode ahead of execution using a recursive-descent parser and code generator.
  • Language Implementations - Lightweight, embeddable Ruby implementation.
  • Ruby Frameworks and Tools - Lightweight Ruby implementation.

Star history

Star history chart for mruby/mrubyStar history chart for mruby/mruby

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does mruby/mruby do?

mruby is a lightweight Ruby interpreter designed to be embedded into C applications. It compiles Ruby source code into a compact, platform-independent bytecode that executes on a register-based virtual machine, and exposes a stable C API for host programs to initialize the interpreter, load bytecode, and invoke Ruby methods at runtime.

What are the main features of mruby/mruby?

The main features of mruby/mruby are: Bytecode Interpreters, Source-to-Bytecode Compilers, C-Based Embedding APIs, Embedded Script Execution, Embedded Scripting Engines, Register-Based Bytecode, Scripting Runtimes, Single-File Libraries.

What are some open-source alternatives to mruby/mruby?

Open-source alternatives to mruby/mruby include: janet-lang/janet — Janet is a Lisp-based dynamic programming language featuring a register-based bytecode virtual machine and an… wren-lang/wren — Wren is an embeddable, class-based scripting language and bytecode interpreter. It provides a dependency-free virtual… lua/lua — Lua is an embeddable scripting language written in ISO C, designed to be integrated into host applications for runtime… svaarala/duktape — Duktape is an embeddable JavaScript engine and portable scripting runtime designed for integration into C and C++… yuin/gopher-lua — Gopher-lua is a complete implementation of the Lua language and its standard libraries written natively in Go. It… quickjs-ng/quickjs — QuickJS is a lightweight, embeddable ECMAScript runtime that executes JavaScript programs conforming to the latest…

Open-source alternatives to Mruby

Similar open-source projects, ranked by how many features they share with Mruby.
  • janet-lang/janetjanet-lang avatar

    janet-lang/janet

    4,308View on GitHub↗

    Janet is a Lisp-based dynamic programming language featuring a register-based bytecode virtual machine and an embeddable scripting engine. It functions as a fiber-based concurrency runtime and includes a parsing engine based on Parsing Expression Grammars. The project is distinguished by its ability to be integrated into C or C++ applications via a minimal header interface. It utilizes a Lisp-style macro system for compile-time code transformation and employs prototype-based table inheritance for object-oriented behavior. The runtime covers a broad set of capabilities, including asynchronous

    Ccfunctional-languageimperative-language
    View on GitHub↗4,308
  • wren-lang/wrenwren-lang avatar

    wren-lang/wren

    8,043View on GitHub↗

    Wren is an embeddable, class-based scripting language and bytecode interpreter. It provides a dependency-free virtual machine designed for integrating dynamic script execution into host applications via a C API. The language is centered on a modern object-oriented model featuring inheritance, method overloading, and first-class functions. It utilizes a concurrent fiber runtime to manage lightweight, cooperatively scheduled execution paths without relying on operating system threads. The project includes a comprehensive suite of object-oriented primitives, closure-based state capture, and a m

    Wrenbytecodecfibers
    View on GitHub↗8,043
  • lua/lualua avatar

    lua/lua

    9,768View on GitHub↗

    Lua is an embeddable scripting language written in ISO C, designed to be integrated into host applications for runtime customization. It provides a C-based scripting engine and a prototype-based object model that utilizes associative arrays and metatables to implement inheritance and complex data structures. The language features a cooperative multitasking system that manages concurrent execution threads via coroutines and an incremental garbage collector for automatic memory management. It includes a safe code sandbox to isolate global state and run untrusted scripts within a protected envir

    C
    View on GitHub↗9,768
  • svaarala/duktapesvaarala avatar

    svaarala/duktape

    6,208View on GitHub↗

    Duktape is an embeddable JavaScript engine and portable scripting runtime designed for integration into C and C++ applications. It functions as a lightweight ECMAScript runtime that provides a C-JavaScript bridge for exchanging data and invoking functions between native code and a script execution environment. The engine includes an ECMAScript bytecode compiler that allows for the serialization and caching of compiled functions to disk to reduce application startup time. It organizes script dependencies using a CommonJS-compliant module loader. The runtime covers a variety of capabilities in

    JavaScriptduktapejavascriptjavascript-engine
    View on GitHub↗6,208
See all 30 alternatives to Mruby→