Metadata-Version: 2.4
Name: willrust
Version: 0.1.0
Summary: Native execution engine and fast task inventory for Paxlet / Willman ecosystem
Author-email: Tom Sapletta <tom@sapletta.com>
License: Proprietary
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# willrust

Native high-performance execution engine and task inventory for the Paxlet / Willman ecosystem.

## Overview

`willrust` is a dedicated Rust-native component in the `paxlet-com` modular ecosystem (`willman`, `willgui`, `willapp`, `willops`, `willbench`, `willmesh`, `willrust`).

It offloads CPU-intensive and I/O-heavy operations from the Python runtime:
* **Planfile Inventory**: High-speed multi-project sprint and ticket inventory scanning with incremental signature-based caching (25x faster than Python).
* **Process Supervision**: Bounded POSIX process group supervision, SIGTERM/SIGKILL escalation, pipe streaming, and zombie reaping.
* **Task Queue & DAG Scheduling**: High-throughput task transitions and atomic leasing without Python GIL contention.

## Installation & Build

### Rust Binary
```bash
cargo build --release
# Binary produced at: target/release/willrust
```

### Python Package
```bash
pip install -e .
```

## Usage

### In Python
```python
import willrust

# 1. Fast project inventory scan
result = willrust.inventory(base="/home/tom/github/paxlet-com", max_projects=10)
print(f"Projects found: {result['projects_found']} in {result['duration_ms']} ms")

# 2. Supervised process execution
proc_res = willrust.run_process(["echo", "hello"], timeout_seconds=10.0)
print(f"Returncode: {proc_res['returncode']}, Output: {proc_res['stdout']}")
```

### Via CLI (JSON Process Contract)
```bash
echo '{"action":"inventory","base":"/home/tom/github/paxlet-com","max_projects":5,"cache":"/tmp/cache"}' | willrust
```

## Verification

```bash
cargo test
python3 -m unittest discover -s tests -v
```
