Pre Requisites

Installation

Add scarb as an asdf plugin

asdf plugin add scarb

Create a project folder called fib for Fibonacci

mkdir fib
cd fib

Set scarb nightly as the project’s version in .tool-versions

asdf set scarb latest:nightly

Install the project dependencies defined in .tool-versions

asdf install

Initialize a scarb project for vanilla Cairo (not Starknet) by choosing Cairo Test as test runner

scarb init
>>>
Which test runner do you want to set up? Cairo Test

Add the following configuration options to Scarb.toml

[package]
name = "fib"
version = "0.1.0"
edition = "2024_07"

[[target.executable]]   # add line

[dependencies]
cairo_execute = "2.9.2" # add line

[dev-dependencies]
cairo_test = "2.9.2"

[cairo]                 # add line
enable-gas = false      # add line

Make the following changes to the file lib.cairo: