<p align="center">
<img alt="Zakuro" src="https://raw.githubusercontent.com/zakuro-ai/zakuro/master/imgs/zakuro-banner.png">
</p>
<h3 align="center">The Zakuro broker and CLI: share your machine, or send work to the mesh.</h3>
<p align="center">
<a href="https://crates.io/crates/zc2"><img alt="crates.io" src="https://img.shields.io/crates/v/zc2?color=blue"></a>
<img alt="Platforms" src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-blue">
<img alt="License" src="https://img.shields.io/badge/license-MIT-blue">
</p>
<p align="center">
<a href="https://docs.zakuro-ai.com/zc/"><b>Documentation</b></a> •
<a href="https://docs.zakuro-ai.com/install/zc/">Install</a> •
<a href="https://docs.zakuro-ai.com/zc/broker/">Broker</a> •
<a href="https://docs.zakuro-ai.com/zc/routing/">Routing</a>
</p>
---
`zc` joins your machine to the Zakuro mesh. Share it as a worker and it gets paid for the jobs it runs; run a broker and it routes each request to the best worker by price, latency or availability, with yen-denominated billing backed by a write-ahead log.
## Install
```bash
Or from crates.io (the crate is `zc2`; it installs the `zc` command). Keep `--locked`: a fresh dependency resolution does not build.
```bash
cargo install zc2 --locked
```
## Use it
```bash
zc login # sign in with your Zakuro account
zc share # offer this machine to the mesh as a worker
zc status # mesh connection and workers
zc unshare # stop sharing
```
From Python, the [Zakuro SDK](https://github.com/zakuro-ai/zakuro) sends calls through `zc` to a node on the mesh:
```python
import zakuro as zk
@zk.fn
def square(x: int) -> int:
return x * x
print(square.to(zk.Compute(uri="zc://node-dd715b7f0a1c2e34", verify=False))(7)) # → 49
```
Everything else is in the **[documentation](https://docs.zakuro-ai.com/zc/)**: [the broker](https://docs.zakuro-ai.com/zc/broker/), [routing strategies](https://docs.zakuro-ai.com/zc/routing/), [billing and the WAL](https://docs.zakuro-ai.com/zc/credits-wal/), [the P2P mesh](https://docs.zakuro-ai.com/zc/p2p-mesh/), [worker discovery](https://docs.zakuro-ai.com/zc/discovery/), [cluster commands](https://docs.zakuro-ai.com/zc/cluster/) and [benchmarking](https://docs.zakuro-ai.com/zc/benchmarking/).
---
<p align="center">
Part of <a href="https://zakuro-ai.com">Zakuro</a> • <a href="https://github.com/zakuro-ai/zakuro">Zakuro SDK</a> • <a href="https://github.com/zakuro-ai/sakura">Sakura</a> • MIT
</p>