Code Monkey home page Code Monkey logo

artichoke's Introduction

Artichoke Ruby

CircleCI Discord
Core documentation Virtual filesystem documentation mruby backend documentation mruby-sys documentation

Artichoke is a platform for implementing spec-compliant Ruby implementations. Artichoke provides a Ruby runtime implemented in Rust that can be loaded into many VM backends.

Architecture

A Ruby implementation based on Artichoke consists of three components: Artichoke core, a VM backend, and the Artichoke frontend.

Core

Artichoke core exposes a set of traits that define:

  • Capabilities of a VM backend.
  • Capabilities of a Ruby Value.
  • Interoperability between the VM backend and the Rust-implemented core.

Capabilities a Ruby implementation must provide include evaling code, declaring classes and modules, and exposing top self.

Runtime

Artichoke core provides an implementation-agnostic Ruby runtime which any implementation can load. The runtime in Artichoke core will pass 100% of the Core and Standard Library Ruby specs. The runtime will be implemented in a hybrid of Rust and Ruby. The Regexp implementation is a representative example of the approach.

Embedding

Artichoke core will support embedding with:

Experimentation

A Rust-implemented Ruby runtime offers an opportunity to experiment with:

VM Backend

Artichoke core does not provide a parser or a VM for executing Ruby. VM backends provide these functions.

Artichoke currently includes an mruby backend. There are plans to add an MRI backend and a pure Rust backend.

VM backends are responsible for passing 100% of the Language Ruby specs.

Experimentation

VM backends offer an opportunity to experiment with:

Frontend

Artichoke will include ruby and irb binary frontends with dynamically selectable VM backends.

Artichoke will produce a WebAssembly frontend.

Artichoke will include implementation-agnostic C APIs targeting:

Try Artichoke

You can try Artichoke in your browser. The Artichoke Playground runs a WebAssembly build of Artichoke.

If you would prefer to run a local build, set up a Rust toolchain and launch an interactive Artichoke shell with:

cargo run -p artichoke-frontend --bin airb

Contributing

Artichoke aspires to be a Ruby 2.6.3-compatible implementation of the Ruby programming language. There is lots to do.

If Artichoke does not run Ruby source code in the same way that MRI does, it is a bug and we would appreciate if you filed an issue so we can fix it.

If you would like to contribute code ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป, find an issue that looks interesting and leave a comment that you're beginning to investigate. If there is no issue, please file one before beginning to work on a PR.

Discussion

If you'd like to engage in a discussion outside of GitHub, you can join Artichoke's public Discord server.

artichoke's People

Contributors

lopopolo avatar johnwahba avatar felipecsl avatar kachick avatar chocolateboy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.