Artichoke is a platform for building MRI-compatible Ruby implementations. Artichoke provides a Ruby runtime implemented in Rust that can be loaded into many VM backends. Rubies implemented with Artichoke will be source and C API compatible with MRI Ruby 2.6.3.
Artichoke Ruby Wasm Playground
You can try Artichoke in your browser. The Artichoke Playground runs a WebAssembly build of Artichoke.
You can launch an interactive irb
-style shell locally. The following command
launches the Artichoke irb
shell using cargo
. cargo
is the Rust equivalent
to Ruby bundler
that also manages building Rust code.
cargo run --bin airb
To build Artichoke, you'll need Rust, clang, and Ruby.
CONTRIBUTING.md
has more detail on
how to set up the compiler toolchain.
Artichoke is designed to enable experimentation. The top goals of the project are:
- Support WebAssembly as a build target.
- Support embedding and executing Ruby in untrusted environments.
- Distribute Ruby applications as single-binary artifacts.
- Implement Ruby with state-of-the-art dependencies.
- Experiment with VMs to support dynamic codegen, ahead of time compilation, parallelism and eliminating the GIL, and novel memory management and garbage collection techniques.
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.
Good first issues are labeled E-easy
.
If you'd like to engage in a discussion outside of GitHub, you can join Artichoke's public Discord server.