CactUScript by CactusProtocol
CactUScript is a new high-level programming language designed specifically for the Solana Virtual Machine (SVM). Our primary goal is to fundamentally eliminate common security vulnerabilities associated with Cross-Program Invocation (CPI) and complex memory management in existing Solana languages.
By simplifying the syntax and introducing secure abstractions, CactUScript aims to be the safest and fastest way to deploy DeFi and high-performance applications on Solana.
The CactUScript compiler and interpreter are written in Python, providing a robust and transparent architecture for the community to audit and contribute to.
| Component | File | Function |
|---|---|---|
| Execution Core | vm.py & interpreter.py |
Handles runtime interpretation and acts as the foundation for the future BPF/eBPF compilation step. |
| Language Processing | lexer.py & parser.py |
Tokenizes and constructs the Abstract Syntax Tree (AST), ensuring strict syntax validation. |
| CLI & Testing | cli.py & repl.py |
Command Line Interface and Read-Eval-Print Loop for rapid development and testing. |
| Folder | Purpose |
|---|---|
Cactus-Script/src/ |
The core compiler and interpreter source code. (The engine) |
Cactus-Script/examples/ |
Demonstrative .cact programs (e.g., smart_contract.cact, fibonacci.cact). |
Cactus-Script/main.py |
The main entry point for the CactUScript compiler/CLI. |
- Python 3.9+
pip(Python package installer)
- Clone the repository:
git clone [https://github.com/CactusProtocol/CactUScript.git](https://github.com/CactusProtocol/CactUScript.git)
cd CactUScript/Cactus-Script
pip install -r requirements.txt
python main.py repl
python main.py run examples/hello.cact