Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.59 KB

README.md

File metadata and controls

49 lines (33 loc) · 1.59 KB

soup

A simple programming language, built from scratch in Rust

ci workflow

Language Specification

Check out the language specification in the Wiki!

Installation

Note first that soup is designed solely to work on Mac M1 processors.

  1. First, ensure you have installed Rust

  2. Clone the repository:

$ git clone https://github.com/dylanjtuttle/soup.git
$ cd soup
  1. Open the file soup, a bash script that we will call when we want to compile a soup file, in your favourite text editor.
  • On line 1, replace #!/opt/homebrew/bin/bash with #![location/of/shell], which you can find by running the following command:

    $ which bash
  • Create an environment variable $SOUP_DIR which holds the path to the soup directory you are currently in, and then add it to your path, by adding the following two lines near the end of your ~/.bashrc file:

    export SOUP_DIR="[/absolute/path/to/soup/dir]"
    export PATH=$PATH:$SOUP_DIR
    • Note that since ~/.bashrc is executed once every time a terminal window is opened, these two environment variables only take effect once you exit your current terminal window and open a new one.
  1. Compile the compiler with the following command:
$ cargo build --release
  1. Create a .soup file anywhere on your hard drive, and then compile and run it with the following command:
$ soup [name].soup

Congratulations!!