Building¶
The project includes several shell scripts to streamline common tasks.
Development Build Script¶
Builds a development version of the package:
This script:
- Creates/activates a virtual environment (
env/) - Installs Maturin if not present
- Generates Python stub files (
.pyi) - Builds and installs the extension module in development mode
The development build is faster but not optimized. After running, the virtual environment should be active. If not, it can be activated via:
The kaspa Python module can than be imported and used in Python.
Release Build Script¶
Builds a release version and wheels of the package:
This script:
- Creates/activates a virtual environment (
env/) - Installs Maturin if not present
- Generates Python stub files (
.pyi) - Builds optimized wheel (
.whl)
Output files are placed in target/wheels/.
(Approximate) CI Validation Script¶
This script runs the following:
cargo fmt --all- Format Rust codecargo clippy -- -D warnings- Lint Rust code (warnings as errors)./build-dev- Build the extensionpip install -e ".[dev,docs]"- Install dependenciespytest tests/unit -v- Run unit testspytest tests/integration -v- Run integration testsmkdocs build --strict- Verify documentation builds