Protostar manages your dependencies, compiles your project, and runs tests.
https://docs.swmansion.com/protostar/
To install the tool, run:
curl -L https://raw.githubusercontent.com/software-mansion/protostar/master/install.sh | bash
If you want to specify a version, run the following command with the requested version:
curl -L https://raw.githubusercontent.com/software-mansion/protostar/master/install.sh | bash -s -- -v 0.3.2
- good knowledge of Python
- good knowledge of pytest
- basic knowledge of Cairo and StarkNet
- basic knowledge of mypy
- Install Python version management tool: pyenv or asdf
- Install
Python 3.9.14
using the Python version management tool and activate that version- To be able to build Protostar, set the following environmental variable before installing Python:
PYTHON_CONFIGURE_OPTS="--enable-shared"
- To be able to build Protostar, set the following environmental variable before installing Python:
- Clone this repository
- Verify the active Python version:
python -V
- Install Poetry — a dependency manager
- Create Python virtual environment in the project directory:
poetry env use 3.9
- Activate environment:
poetry shell
- Upgrade pip:
pip install --upgrade pip
- Install project dependencies:
poetry install
- MacBook M1/M2:
CFLAGS=-I/opt/homebrew/opt/gmp/include LDFLAGS=-L/opt/homebrew/opt/gmp/lib poetry install
- MacBook M1/M2:
- Verify the setup by running tests:
poe test
- Build Protostar:
poe build
- You can find the newly created binary at
dist/protostar/protostar
- You can find the newly created binary at
Run the following snippet to enable lint checks and automatic formatting before commit/push.
cp pre-push ./.git/hooks/
cp pre-commit ./.git/hooks/
chmod +x ./.git/hooks/pre-commit
chmod +x ./.git/hooks/pre-push
Please read website/README.md.
$ poe deploy
Current Protostar version: 0.1.0
Provide the new Protostar version: