llmwerewolf-rs


Namellmwerewolf-rs JSON
Version 0.0.2 PyPI version JSON
download
home_pageNone
SummaryPython wrapper for the LLM Werewolf Rust binary.
upload_time2025-10-19 17:52:54
maintainerNone
docs_urlNone
authorWei Lee
requires_python>=3.8
licenseMIT
keywords cli ai werewolf llm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center" markdown="1">

# LLMWereWolf-rs

[![Crates.io](https://img.shields.io/crates/v/llmwerewolf-rs?logo=rust&style=flat-square&color=E05D44)](https://crates.io/crates/llmwerewolf-rs)
[![Crates.io Downloads](https://img.shields.io/crates/d/llmwerewolf-rs?logo=rust&style=flat-square)](https://crates.io/crates/llmwerewolf-rs)
[![npm version](https://img.shields.io/npm/v/llmwerewolf-rs?logo=npm&style=flat-square&color=CB3837)](https://www.npmjs.com/package/llmwerewolf-rs)
[![npm downloads](https://img.shields.io/npm/dt/llmwerewolf-rs?logo=npm&style=flat-square)](https://www.npmjs.com/package/llmwerewolf-rs)
[![PyPI version](https://img.shields.io/pypi/v/llmwerewolf-rs?logo=python&style=flat-square&color=3776AB)](https://pypi.org/project/llmwerewolf-rs/)
[![PyPI downloads](https://img.shields.io/pypi/dm/llmwerewolf-rs?logo=python&style=flat-square)](https://pypi.org/project/llmwerewolf-rs/)
[![rust](https://img.shields.io/badge/Rust-stable-orange?logo=rust&logoColor=white&style=flat-square)](https://www.rust-lang.org/)
[![tests](https://img.shields.io/github/actions/workflow/status/Mai0313/LLMWereWolf-rs/test.yml?label=tests&logo=github&style=flat-square)](https://github.com/Mai0313/LLMWereWolf-rs/actions/workflows/test.yml)
[![code-quality](https://img.shields.io/github/actions/workflow/status/Mai0313/LLMWereWolf-rs/code-quality-check.yml?label=code-quality&logo=github&style=flat-square)](https://github.com/Mai0313/LLMWereWolf-rs/actions/workflows/code-quality-check.yml)
[![license](https://img.shields.io/badge/License-MIT-green.svg?labelColor=gray&style=flat-square)](https://github.com/Mai0313/LLMWereWolf-rs/tree/master?tab=License-1-ov-file)
[![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/Mai0313/LLMWereWolf-rs/pulls)

</div>

🚀 A Rust rewrite of **LLM Werewolf**—the social deduction game powered by LLM agents. This repo hosts the core engine scaffold, release tooling, and multi-language package surfaces that the upcoming implementation will build upon.

Project languages: [English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)

## ✨ Highlights

- Modern Cargo layout (`src/lib.rs`, `src/main.rs`, `tests/`)
- Dynamic version information with git metadata (tag, commit hash, build tools)
- Lint & format with clippy and rustfmt
- GitHub Actions: tests, quality, package build, Docker publish, release drafter, Rust-aware labeler, secret scans, semantic PR, weekly dependency update
- Multi-stage Dockerfile producing a minimal runtime image

## 🚀 Quick Start

**Requirements:**

- Rust 1.85 or higher (using Edition 2024)
- Docker (optional)

Install Rust via `rustup` if you haven't already.

```bash
make fmt            # rustfmt + clippy
make test           # cargo test (all targets)
make test-verbose   # cargo test (all targets with verbose output)
make coverage       # generate LCOV coverage report
make build          # cargo build (release mode)
make build-release  # cargo build --release
make run            # run the release binary
make clean          # clean build artifacts and caches
make package        # build crate package (allow dirty)
make help           # list targets
```

## 📌 Version Information

The binary automatically displays dynamic version information including:

- Git tag version (or `Cargo.toml` version if no tags)
- Commit count since last tag
- Short commit hash
- Dirty working directory indicator
- Rust and Cargo versions used for building

Example output:

```
llmwerewolf-rs v0.1.25-2-gf4ae332-dirty
Built with Rust 1.90.0 and Cargo 1.90.0
```

This version information is embedded at build time through `build.rs` and automatically updated based on your git state.

## 🐳 Docker

```bash
docker build -f docker/Dockerfile --target prod -t ghcr.io/<owner>/<repo>:latest .
docker run --rm ghcr.io/<owner>/<repo>:latest
```

Or using the actual binary name:

```bash
docker build -f docker/Dockerfile --target prod -t llmwerewolf-rs:latest .
docker run --rm llmwerewolf-rs:latest
```

## 📦 Packaging

```bash
make package        # build crate package (allow dirty)
# or use cargo directly:
cargo package --locked --allow-dirty
# CARGO_REGISTRY_TOKEN=... cargo publish
```

CI builds run automatically on tags matching `v*` and upload the `.crate` file. Uncomment the publish step in `build_package.yml` to automate crates.io releases.

Distribution identifiers:

- Crate: `llmwerewolf-rs`
- npm: `llmwerewolf-rs` (and scoped `@mai0313/llmwerewolf-rs`)
- PyPI: `llmwerewolf-rs`

## 🧩 Cross Builds

This setup does not ship cross-compile tooling by default. If you need cross or zig-based builds locally, install and configure them per your environment.

GitHub Actions `build_release.yml` builds multi-platform release binaries on tags matching `v*` and uploads them to the GitHub Release assets.

Targets:

- x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl
- aarch64-unknown-linux-gnu, aarch64-unknown-linux-musl
- x86_64-apple-darwin, aarch64-apple-darwin
- x86_64-pc-windows-msvc, aarch64-pc-windows-msvc

Assets naming:

- `<bin>-v<version>-<target>.tar.gz` (all platforms)
- `<bin>-v<version>-<target>.zip` (Windows additionally)

## 🔁 CI/CD Workflows

### Main Workflows

- Tests (`test.yml`): cargo build/test + generate LCOV coverage report and upload artifact
- Code Quality (`code-quality-check.yml`): rustfmt check + clippy (deny warnings)
- Build Package (`build_package.yml`): package on tag `v*`, optional crates.io publish
- Publish Docker Image (`build_image.yml`): push to GHCR on `main/master` and tags `v*`
- Build Release (`build_release.yml`): Linux release binaries uploaded on tags `v*`

### Additional Automation

- Auto Labeler (`auto_labeler.yml`): automatically label PRs based on branch names and file changes
- Code Scan (`code_scan.yml`): multi-layer security scanning (GitLeaks, Trufflehog secret scanning, CodeQL code analysis, Trivy vulnerability scanning)
- Release Drafter (`release_drafter.yml`): auto-generate release notes
- Semantic PR (`semantic-pull-request.yml`): enforce PR title format
- Dependabot weekly dependency updates

## 🤝 Contributing

- Open issues/PRs

- Use Conventional Commits for PR titles

- Keep code formatted and clippy‑clean

- After every edit, run `cargo build` to confirm compilation is successful

- Before opening a PR, please run locally:

  - `cargo fmt --all -- --check`
  - `cargo clippy --all-targets --all-features -- -D warnings`
  - `cargo test`

## 📄 License

MIT — see `LICENSE`.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llmwerewolf-rs",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "cli, ai, werewolf, llm",
    "author": "Wei Lee",
    "author_email": "Wei Lee <mai@mai0313.com>",
    "download_url": "https://files.pythonhosted.org/packages/83/04/2543dfb4d24932a013db5253b6afe4ebf839bbbd4ec5bbc76a1cf147aa7a/llmwerewolf_rs-0.0.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\" markdown=\"1\">\n\n# LLMWereWolf-rs\n\n[![Crates.io](https://img.shields.io/crates/v/llmwerewolf-rs?logo=rust&style=flat-square&color=E05D44)](https://crates.io/crates/llmwerewolf-rs)\n[![Crates.io Downloads](https://img.shields.io/crates/d/llmwerewolf-rs?logo=rust&style=flat-square)](https://crates.io/crates/llmwerewolf-rs)\n[![npm version](https://img.shields.io/npm/v/llmwerewolf-rs?logo=npm&style=flat-square&color=CB3837)](https://www.npmjs.com/package/llmwerewolf-rs)\n[![npm downloads](https://img.shields.io/npm/dt/llmwerewolf-rs?logo=npm&style=flat-square)](https://www.npmjs.com/package/llmwerewolf-rs)\n[![PyPI version](https://img.shields.io/pypi/v/llmwerewolf-rs?logo=python&style=flat-square&color=3776AB)](https://pypi.org/project/llmwerewolf-rs/)\n[![PyPI downloads](https://img.shields.io/pypi/dm/llmwerewolf-rs?logo=python&style=flat-square)](https://pypi.org/project/llmwerewolf-rs/)\n[![rust](https://img.shields.io/badge/Rust-stable-orange?logo=rust&logoColor=white&style=flat-square)](https://www.rust-lang.org/)\n[![tests](https://img.shields.io/github/actions/workflow/status/Mai0313/LLMWereWolf-rs/test.yml?label=tests&logo=github&style=flat-square)](https://github.com/Mai0313/LLMWereWolf-rs/actions/workflows/test.yml)\n[![code-quality](https://img.shields.io/github/actions/workflow/status/Mai0313/LLMWereWolf-rs/code-quality-check.yml?label=code-quality&logo=github&style=flat-square)](https://github.com/Mai0313/LLMWereWolf-rs/actions/workflows/code-quality-check.yml)\n[![license](https://img.shields.io/badge/License-MIT-green.svg?labelColor=gray&style=flat-square)](https://github.com/Mai0313/LLMWereWolf-rs/tree/master?tab=License-1-ov-file)\n[![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/Mai0313/LLMWereWolf-rs/pulls)\n\n</div>\n\n\ud83d\ude80 A Rust rewrite of **LLM Werewolf**\u2014the social deduction game powered by LLM agents. This repo hosts the core engine scaffold, release tooling, and multi-language package surfaces that the upcoming implementation will build upon.\n\nProject languages: [English](README.md) | [\u7e41\u9ad4\u4e2d\u6587](README.zh-TW.md) | [\u7b80\u4f53\u4e2d\u6587](README.zh-CN.md)\n\n## \u2728 Highlights\n\n- Modern Cargo layout (`src/lib.rs`, `src/main.rs`, `tests/`)\n- Dynamic version information with git metadata (tag, commit hash, build tools)\n- Lint & format with clippy and rustfmt\n- GitHub Actions: tests, quality, package build, Docker publish, release drafter, Rust-aware labeler, secret scans, semantic PR, weekly dependency update\n- Multi-stage Dockerfile producing a minimal runtime image\n\n## \ud83d\ude80 Quick Start\n\n**Requirements:**\n\n- Rust 1.85 or higher (using Edition 2024)\n- Docker (optional)\n\nInstall Rust via `rustup` if you haven't already.\n\n```bash\nmake fmt            # rustfmt + clippy\nmake test           # cargo test (all targets)\nmake test-verbose   # cargo test (all targets with verbose output)\nmake coverage       # generate LCOV coverage report\nmake build          # cargo build (release mode)\nmake build-release  # cargo build --release\nmake run            # run the release binary\nmake clean          # clean build artifacts and caches\nmake package        # build crate package (allow dirty)\nmake help           # list targets\n```\n\n## \ud83d\udccc Version Information\n\nThe binary automatically displays dynamic version information including:\n\n- Git tag version (or `Cargo.toml` version if no tags)\n- Commit count since last tag\n- Short commit hash\n- Dirty working directory indicator\n- Rust and Cargo versions used for building\n\nExample output:\n\n```\nllmwerewolf-rs v0.1.25-2-gf4ae332-dirty\nBuilt with Rust 1.90.0 and Cargo 1.90.0\n```\n\nThis version information is embedded at build time through `build.rs` and automatically updated based on your git state.\n\n## \ud83d\udc33 Docker\n\n```bash\ndocker build -f docker/Dockerfile --target prod -t ghcr.io/<owner>/<repo>:latest .\ndocker run --rm ghcr.io/<owner>/<repo>:latest\n```\n\nOr using the actual binary name:\n\n```bash\ndocker build -f docker/Dockerfile --target prod -t llmwerewolf-rs:latest .\ndocker run --rm llmwerewolf-rs:latest\n```\n\n## \ud83d\udce6 Packaging\n\n```bash\nmake package        # build crate package (allow dirty)\n# or use cargo directly:\ncargo package --locked --allow-dirty\n# CARGO_REGISTRY_TOKEN=... cargo publish\n```\n\nCI builds run automatically on tags matching `v*` and upload the `.crate` file. Uncomment the publish step in `build_package.yml` to automate crates.io releases.\n\nDistribution identifiers:\n\n- Crate: `llmwerewolf-rs`\n- npm: `llmwerewolf-rs` (and scoped `@mai0313/llmwerewolf-rs`)\n- PyPI: `llmwerewolf-rs`\n\n## \ud83e\udde9 Cross Builds\n\nThis setup does not ship cross-compile tooling by default. If you need cross or zig-based builds locally, install and configure them per your environment.\n\nGitHub Actions `build_release.yml` builds multi-platform release binaries on tags matching `v*` and uploads them to the GitHub Release assets.\n\nTargets:\n\n- x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl\n- aarch64-unknown-linux-gnu, aarch64-unknown-linux-musl\n- x86_64-apple-darwin, aarch64-apple-darwin\n- x86_64-pc-windows-msvc, aarch64-pc-windows-msvc\n\nAssets naming:\n\n- `<bin>-v<version>-<target>.tar.gz` (all platforms)\n- `<bin>-v<version>-<target>.zip` (Windows additionally)\n\n## \ud83d\udd01 CI/CD Workflows\n\n### Main Workflows\n\n- Tests (`test.yml`): cargo build/test + generate LCOV coverage report and upload artifact\n- Code Quality (`code-quality-check.yml`): rustfmt check + clippy (deny warnings)\n- Build Package (`build_package.yml`): package on tag `v*`, optional crates.io publish\n- Publish Docker Image (`build_image.yml`): push to GHCR on `main/master` and tags `v*`\n- Build Release (`build_release.yml`): Linux release binaries uploaded on tags `v*`\n\n### Additional Automation\n\n- Auto Labeler (`auto_labeler.yml`): automatically label PRs based on branch names and file changes\n- Code Scan (`code_scan.yml`): multi-layer security scanning (GitLeaks, Trufflehog secret scanning, CodeQL code analysis, Trivy vulnerability scanning)\n- Release Drafter (`release_drafter.yml`): auto-generate release notes\n- Semantic PR (`semantic-pull-request.yml`): enforce PR title format\n- Dependabot weekly dependency updates\n\n## \ud83e\udd1d Contributing\n\n- Open issues/PRs\n\n- Use Conventional Commits for PR titles\n\n- Keep code formatted and clippy\u2011clean\n\n- After every edit, run `cargo build` to confirm compilation is successful\n\n- Before opening a PR, please run locally:\n\n  - `cargo fmt --all -- --check`\n  - `cargo clippy --all-targets --all-features -- -D warnings`\n  - `cargo test`\n\n## \ud83d\udcc4 License\n\nMIT \u2014 see `LICENSE`.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python wrapper for the LLM Werewolf Rust binary.",
    "version": "0.0.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/Mai0313/LLMWereWolf-rs/issues",
        "Homepage": "https://github.com/Mai0313/LLMWereWolf-rs",
        "Repository": "https://github.com/Mai0313/LLMWereWolf-rs"
    },
    "split_keywords": [
        "cli",
        " ai",
        " werewolf",
        " llm"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c7a4c92dcc7b98764e44a85c61921e5dd9ce0f7b64bd17d2437c817fa59bcf71",
                "md5": "1da006a09a4432b3cc76026483026716",
                "sha256": "b795aa365fb6ea19a6b79e71ccb40f634ca5cbfd812d0cc3a4890b16d2321401"
            },
            "downloads": -1,
            "filename": "llmwerewolf_rs-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1da006a09a4432b3cc76026483026716",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5267,
            "upload_time": "2025-10-19T17:52:52",
            "upload_time_iso_8601": "2025-10-19T17:52:52.797510Z",
            "url": "https://files.pythonhosted.org/packages/c7/a4/c92dcc7b98764e44a85c61921e5dd9ce0f7b64bd17d2437c817fa59bcf71/llmwerewolf_rs-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "83042543dfb4d24932a013db5253b6afe4ebf839bbbd4ec5bbc76a1cf147aa7a",
                "md5": "6e7c5332799cbcda678ef2e39e56bbba",
                "sha256": "a1575d3a8211fe4c29da21b9269e8639036342558afb6be4a40211deaa3a27cf"
            },
            "downloads": -1,
            "filename": "llmwerewolf_rs-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "6e7c5332799cbcda678ef2e39e56bbba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 4407,
            "upload_time": "2025-10-19T17:52:54",
            "upload_time_iso_8601": "2025-10-19T17:52:54.228629Z",
            "url": "https://files.pythonhosted.org/packages/83/04/2543dfb4d24932a013db5253b6afe4ebf839bbbd4ec5bbc76a1cf147aa7a/llmwerewolf_rs-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-19 17:52:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Mai0313",
    "github_project": "LLMWereWolf-rs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "llmwerewolf-rs"
}
        
Elapsed time: 2.35754s