-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
23 lines (17 loc) · 863 Bytes
/
justfile
File metadata and controls
23 lines (17 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
set shell := ["bash", "-euc"]
build:
cmake -S . -B build
cmake --build build
test: build
./build/unit_tests
add NUMBER_1 NUMBER_2: build
./build/run_program examples/add.txt {{NUMBER_1}} {{NUMBER_2}}
# this program will being wrapping after the sequence exceeds u32 max
fibonacci FIRST_NUMBER SECOND_NUMBER ITERATIONS: build
./build/run_program examples/fibonacci.txt 0 1 {{FIRST_NUMBER}} {{SECOND_NUMBER}} {{ITERATIONS}}
# this program will recurse and hit the instruction limit if (TO - FROM) % STEP != 0
count_up FROM TO STEP: build
./build/run_program examples/count_up.txt {{FROM}} {{TO}} {{STEP}}
# run your own program, ie: "just run example/program.txt 5 10 20" would run program.txt with memory at address 0 set to 5, address 1 to 10, etc
run PROGRAM_PATH *MEMORY: build
./build/run_program {{PROGRAM_PATH}} {{MEMORY}}