Skip to content

dylanjtuttle/soup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!!

About

A simple programming language, built from scratch in Rust

Resources

License

Stars

Watchers

Forks

Packages

No packages published