phansch / artichoke

πŸ’Ž Artichoke is a Ruby made with Rust

Home Page:https://www.artichokeruby.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Artichoke Ruby

GitHub Actions Discord Twitter
Crate API API master

Artichoke is a Ruby implementation written in Rust and Ruby. Artichoke intends to be MRI-compatible and targets Ruby 2.6.3. Artichoke provides a Ruby runtime implemented in Rust and Ruby.

Try Artichoke


Artichoke Ruby Wasm Playground

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

Install Artichoke

Prebuilt nightly binaries

Download a prebuilt binary from artichoke/nightly. Binaries are available for Linux, Linux/Musl, macOS, and Windows.

These daily binaries track the latest master branch of Artichoke.

Cargo

You can install a pre-release build of Artichoke using cargo, Rust's package manager, by running:

cargo install --git https://github.com/artichoke/artichoke --locked artichoke

To install via cargo install or to checkout and build locally, you'll need Rust, clang, and Ruby. BUILD.md has more detail on how to set up the compiler toolchain.

Docker

Artichoke is available on Docker Hub.

You can launch a REPL by running:

docker run -it docker.io/artichokeruby/artichoke airb

Usage

Artichoke ships with two binaries: airb and artichoke.

airb

airb is the Artichoke implementation of irb and is an interactive Ruby shell and REPL.

airb is a readline-enabled shell, although it does not persist history.

artichoke

artichoke is the ruby binary frontend to Artichoke.

artichoke supports executing programs via files, stdin, or inline with one or more -e flags.

Artichoke does not yet support local filesystem access. A temporary workaround is to inject data into the interpreter with the --with-fixture flag, which reads file contents into a $fixture global.

$ artichoke --help
artichoke 0.1.0-pre.0
Artichoke is a Ruby made with Rust.

USAGE:
    artichoke [FLAGS] [OPTIONS] [--] [programfile]

FLAGS:
        --copyright    print the copyright
    -h, --help         Prints help information
    -V, --version      Prints version information

OPTIONS:
    -e <commands>...                one line of script. Several -e's allowed. Omit [programfile]
        --with-fixture <fixture>    file whose contents will be read into the `$fixture` global

ARGS:
    <programfile>

Design and Goals

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

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. Good first issues are labeled E-easy.

Discussion

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

License

artichoke is licensed with the MIT License (c) Ryan Lopopolo.

Some portions of Artichoke are derived from third party sources. The READMEs in each crate discuss which third party licenses are applicable to the sources and derived works in Artichoke.

About

πŸ’Ž Artichoke is a Ruby made with Rust

https://www.artichokeruby.org/

License:MIT License


Languages

Language:Rust 80.1%Language:Ruby 18.0%Language:C 1.1%Language:JavaScript 0.3%Language:C++ 0.3%Language:HTML 0.1%