Skip to main content
  1. Projects/

jai

·135 words·1 min
Jake Roggenbuck
Author
Jake Roggenbuck
I am currently studying Computer Science

Jai
Pytest
#

Our entry to the langjam

image

Requirements: #

Rust & Python

  1. Pip requirements: run

    pip install -r requirements.txt
    

Build instructions #

  1. Build the lexer crate with

    maturin build
    
  2. Install lexer with

    pip install ./target/wheels/jai-0.1.1-*
    # Add a `--force-reinstall` if reinstalling
    

Troubleshooting #

  • If you get something saying maturin command not found after you install it via pip. Try using python3 -m pip to install it and python3 -m maturin to run it.
  • If jai does not seem to change after editing the source, make sure to do the build instructions again and use --force-reinstall

Test #

  1. Run build instructions
  2. run pytest

image

Syntax #

Variable #

variable: type;
variable: type = value;

Functions #

fn myfunc(num: int) -> int {
    return num + 10;
}

Types #

Namedetails
intan integer
stra string