Skip to content

Latest commit

 

History

History
112 lines (85 loc) · 4.89 KB

artichoke-design-and-goals.md

File metadata and controls

112 lines (85 loc) · 4.89 KB

Design and Goals

Artichoke is a platform for building Ruby implementations. You can build a ruby/spec-compliant Ruby by combining Artichoke core, a VM and parser backend, and the Artichoke frontend.

Artichoke is designed to enable experimentation. The top goals of the project are:

Core

The traits in Artichoke core define:

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

Example capabilities a Ruby implementation must provide include evaluating code, declaring classes and modules, and exposing top self.

Runtime

Artichoke core provides an implementation-agnostic Ruby runtime. 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: