A Chef interpreter, written in Rust

Programs that read like recipes.

Cheffers is a complete interpreter for Chef, the esoteric programming language where every program is a cooking recipe: ingredients are variables, mixing bowls are stacks, and the method is the code.

Runs entirely in your browser via WebAssembly — nothing to install, nothing sent to a server.

the-answer-broth.chef Run it
The Answer Broth.

The simplest dish in the book: one ingredient, one bowl, one perfect number. Serve warm to fans of intergalactic hitchhiking.

Ingredients.
42 g mystery beans

Method.
Put mystery beans into the mixing bowl. Pour contents of the mixing bowl into the baking dish.

Serves 1.
Output 42

The language

What is Chef?

Chef is an esoteric programming language created by David Morgan-Mar in 2002. Programs in Chef look like cooking recipes — ingredients represent variables, mixing bowls are stacks, and cooking instructions translate to program operations.

When executed, your recipe doesn't just cook a dish — it computes!

  • Ingredientvariable
  • Mixing bowlstack
  • Baking dishoutput
  • Refrigeratorinput
  • Sous-cheffunction

Features

Cooked to the spec

62 / 62

100% complete

All 62 specification tests passing.

Rust

Fast & efficient

Built with Rust for optimal performance.

1 command

Easy to use

A simple command-line interface: cheffers recipe.chef.

CI / CD

Well tested

A comprehensive test suite runs on every push.

Getting started

Install it, then serve a recipe

Installation
# From GitHub
cargo install --git https://github.com/y-a-v-a/cheffers

# From source
git clone https://github.com/y-a-v-a/cheffers.git
cd cheffers
cargo install --path .
Quick example
# Run a Chef recipe
cheffers path/to/recipe.chef

# Try the included examples
cheffers tests/fixtures/hello-world.chef
cheffers tests/fixtures/fibonacci.chef

Project

About Cheffers

Version
0.2.0
License
MIT
Language
Rust (2021 edition)

Contributing

Found a bug or want to contribute? Visit the GitHub repository to open an issue or submit a pull request.

External resources

Ready to start cooking with code?

Learn the fundamentals with the stack-based programming guide, or jump straight into the playground.