Installation and Building
Prerequisites
- Rust toolchain (1.70 or later)
- Python 3.8 or later (abi3 stable ABI; compatible with CPython 3.8–3.14+)
- maturin 1.x
Build Instructions
# Install maturin
pip install maturin
# Build the wheel (release mode) — maturin reads pyproject.toml automatically
maturin build --release
# Or build in development mode (with a virtualenv active)
maturin develop
The wheel will be created in target/wheels/.
Maturin is configured in pyproject.toml to build the synta-python crate:
[tool.maturin]
manifest-path = "synta-python/Cargo.toml"
module-name = "synta._synta"
bindings = "pyo3"
python-source = "python"
To enable OpenSSL-backed features (PKCS#12 encryption, CMS EnvelopedData construction, X.509 chain verification):
maturin develop --features openssl
maturin build --release --features openssl
To additionally enable legacy PKCS#12 decryption algorithms (3DES, RC2):
maturin develop --features openssl,deprecated-pkcs12-algorithms
Installation
# Install the built wheel
pip install target/wheels/synta-0.1.0-cp38-abi3-manylinux_2_34_x86_64.whl
Running tests
# Build in development mode first
python -m venv venv
source venv/bin/activate
maturin develop
# Run the Python test suite
python -m pytest tests/python/
Note on PYTHONPATH: When running scripts directly (not via
pytest), usePYTHONPATH=python python3 script.pyso Python can find thesyntapackage inpython/synta/.