stir

Crates.iostir
lib.rsstir
version0.0.2
sourcesrc
created_at2020-05-02 21:54:56.621912
updated_at2020-05-06 21:47:33.390775
descriptionSmall Threaded Intermediate Representation
homepage
repositoryhttps://github.com/cohenarthur/stir
max_upload_size
id236812
size19,789
(CohenArthur)

documentation

README

stir

stir aims to provide an easy to use Intermediate Representation. The ultimate goal of stir is to parallelize the generated IR code, while applying some other optimization passes.

stir is built around the idea of building blocks. Some blocks have reference to other blocks, that they can call and execute. Each block implements the following functionalities:

  • Debugging
  • Pretty-printing
  • Interpretation
  • Translation to LLVM
  • Optimisation

To put blocks together, use a Recipe. To run the Recipe, just fry it ! A recipe needs an entry block (or main block) to start interpreting from.

Use the fry binary to intepret STIR code. fry can interpret code pretty-printed from the stir crate, or code directly written in a .stir file ! For a rundown of the syntax, check SYNTAX.md

To use STIR as a representation for your language, simply add a translation unit from your AST to STIR building blocks.

Features

  • Interpretation
  • JIT Interpretation!
  • Translation to LLVM
  • IR multithreading

Available building blocks

  • Boolean
  • IfElse
  • Loop
Commit count: 69

cargo fmt