Metadata-Version: 2.5
Name: dikolab-horde-plugin-rust
Version: 0.0.3
Summary: The horde plugin for Rust — cargo crates, and the WebAssembly other plugins consume.
Project-URL: Homepage, https://diko316.gitlab.io/dikolab-horde/
Project-URL: Documentation, https://diko316.gitlab.io/dikolab-horde/
Project-URL: Funding, https://paypal.me/dikolab
Author-email: Diko TechSlave <diko316@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: cargo,horde,monorepo,plugin,rust,wasm
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Build Tools
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: dikolab-horde-common>=0.0.3
Requires-Dist: dikolab-horde-sdk>=0.0.3
Description-Content-Type: text/markdown

<img src="https://diko316.gitlab.io/dikolab-horde/assets/horde-logo.png" alt="horde" width="140">

# dikolab-horde-plugin-rust

**The horde plugin for cargo crates** — and the source of the WebAssembly the
other plugins consume.

You do not normally install it yourself: `horde use rust` puts it in the
workspace venv and registers it in `horde.toml`. It is not a library you import;
it ships a console script horde spawns as a worker.

> **Status: alpha.** `0.0.2` implements the ten commands plus `format`, and is
> exercised end to end against a real horde. The interfaces may still move.

## Prerequisites

- Python 3.11 or newer, and [horde](https://pypi.org/project/dikolab-horde/)
- `cargo`, `wasm-pack`, `wasmtime` and `emcc` on your `PATH`

All four are checked by `horde use rust` **even if every crate is a plain
library**. That is deliberate: one predictable failure while you set up, rather
than a surprise the first time somebody adds a WebAssembly target.

## Getting started

```sh
horde use rust
horde rust configure
horde rust create wasm-core --type lib
horde rust build wasm-core
```

`configure` writes the cargo workspace root and the formatting rules. `create`
scaffolds the crate under `rust/` with a `horde-package.toml` beside its
`Cargo.toml`.

### WebAssembly, which is the point

A crate says what it builds to:

```toml
# rust/wasm-core/horde-package.toml
build_type = "wasm32-wasip1"
```

| `build_type` | Built with | Consumed by |
|---|---|---|
| `web` | `wasm-pack` | a browser bundle |
| `wasm32-wasip1` | `cargo` | **Python, through `wasmtime`** |
| `wasm32-unknown-emscripten` | `emcc` | JavaScript via Emscripten glue |

Another package then names the crate, and horde builds it first and copies the
output where that ecosystem expects it — you copy nothing by hand:

```toml
# typescript/api/horde-package.toml
depends_on = ["rust:wasm-core"]
```

`wasm32-wasip1` is how a Python package calls into Rust with **no native
extension and no per-platform wheels**.

## Commands

Eleven: the ten horde routes, plus `format`.

| Command | Runs | Example |
|---|---|---|
| `configure` | the cargo workspace root and rustfmt rules | `horde rust configure` |
| `create` | scaffolds a crate | `horde rust create parser --type lib` |
| `list` | each crate and its version | `horde rust list` |
| `bump` | raises the version in `Cargo.toml` | `horde rust bump parser --patch` |
| `lint` | clippy | `horde rust lint` |
| `format` | rustfmt | `horde rust format` |
| `test` | `cargo test` | `horde rust test parser` |
| `build` | compiles, resolving dependencies first | `horde rust build wasm-core` |
| `run` | runs a crate | `horde rust run cli` |
| `publish` | uploads to crates.io — **only with `-y`** | `horde rust publish parser -y` |
| `delete` | removes a crate | `horde rust delete parser` |

**The build types, where output lands, and the full pipelines:**
https://diko316.gitlab.io/dikolab-horde/dikolab-horde-plugin-rust/manual/

## Documentation

- [Manual](https://diko316.gitlab.io/dikolab-horde/dikolab-horde-plugin-rust/manual/) — getting started and commands
- [The Rust plugin](https://diko316.gitlab.io/dikolab-horde/plugins/rust/) · [WebAssembly](https://diko316.gitlab.io/dikolab-horde/guide/wasm/)
- [Release notes](https://diko316.gitlab.io/dikolab-horde/dikolab-horde-plugin-rust/release-notes/)

## Support

If horde saves you time, you can support its development:
https://paypal.me/dikolab

---

© 2025–2026 dikolab. Released under the MIT License.
