{"id":49066714,"url":"https://github.com/yieldspace/nirvash","last_synced_at":"2026-04-20T05:07:48.902Z","repository":{"id":344776117,"uuid":"1182297205","full_name":"yieldspace/nirvash","owner":"yieldspace","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-16T08:18:31.000Z","size":1209,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-16T20:48:51.998Z","etag":null,"topics":["rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yieldspace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-15T10:23:00.000Z","updated_at":"2026-03-16T16:25:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yieldspace/nirvash","commit_stats":null,"previous_names":["yieldspace/nirvash"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/yieldspace/nirvash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yieldspace%2Fnirvash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yieldspace%2Fnirvash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yieldspace%2Fnirvash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yieldspace%2Fnirvash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yieldspace","download_url":"https://codeload.github.com/yieldspace/nirvash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yieldspace%2Fnirvash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32033735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rust"],"created_at":"2026-04-20T05:07:48.263Z","updated_at":"2026-04-20T05:07:48.896Z","avatar_url":"https://github.com/yieldspace.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nirvash\n\n`nirvash` is a standalone Rust workspace for writing and checking transition-system\nspecifications in the style of TLA+, but with Rust types, macros, checkers, and runtime\nbindings.\n\nIt is not a TLA+ parser or a full compatibility layer. The core contract is:\n\n```text\nFrontendSpec + TemporalSpec -\u003e LoweredSpec -\u003e checker / conformance / proof / docgen\n```\n\nThat shared boundary lets one authored system flow into explicit model checking, symbolic\nchecking, generated runtime tests, proof export, and documentation generation without changing\nthe spec.\n\n## Five-Minute Tour\n\nThe shortest introduction is the lock-manager example:\n\n```bash\ncargo run --manifest-path examples/lock-manager-model/Cargo.toml\n```\n\nIt models a tiny system with two clients and one shared lock:\n\n- `Request(client)` moves a client from `Idle` to `Waiting`\n- `Grant(client)` moves a waiting client to `Holding` when nobody else holds the lock\n- `Release(client)` returns the holder to `Idle`\n- an invariant enforces mutual exclusion\n\nThe example binary lowers the Rust-authored spec, explores the full reachable graph, and prints\none witness for a lock handoff from Alice to Bob:\n\n```text\nspec: lock_manager\nreachable states: 8\nholding states: 4\nsample handoff plan:\n  1. alice requests lock\n  2. alice granted lock\n  3. bob requests lock\n  4. alice releases lock\n  5. bob granted lock\ntarget state: LockState { alice: Idle, bob: Holding }\n```\n\nTo verify the mock runtime against the same model:\n\n```bash\ncargo test --manifest-path examples/lock-manager-model/Cargo.toml -- --nocapture\n```\n\nIf your shell already exports `RUST_LOG`, that value wins. Use `RUST_LOG=debug` to force\nthe generated route logs on.\n\nThat example includes:\n\n- a `FrontendSpec + TemporalSpec` model\n- a `#[nirvash_binding]` mock runtime\n- generated tests installed through `generated::install::all_tests!`\n- `tracing::debug!` route logs for generated test execution with `-- --nocapture`\n- reachable-graph exploration through `ExplicitModelChecker`\n\n## How The Workspace Fits Together\n\n- `crates/nirvash`\n  - Rust-first authoring facade with DSL entry points such as `pred!`, `step!`, `ltl!`,\n    `TransitionProgram`, and DocGraph helpers\n- `crates/nirvash-lower`\n  - Canonical lowering boundary centered on `LoweredSpec`\n- `crates/nirvash-check`\n  - Stable explicit and symbolic checker front doors\n- `crates/nirvash-conformance`\n  - Runtime replay, generated harness plans, and adapters for generated tests\n- `crates/nirvash-proof`\n  - Proof bundle export and certificate-oriented types\n- `crates/nirvash-docgen`\n  - Rustdoc-oriented doc graph and Mermaid generation helpers\n- `crates/nirvash-macros`\n  - Proc macros for derives, subsystem specs, runtime bindings, and generated tests\n- `crates/cargo-nirvash`\n  - `cargo nirvash` subcommand implementation\n\nFor the authoring facade and the full architecture diagrams, see\n[`crates/nirvash/README.md`](crates/nirvash/README.md).\n\n## Examples\n\n- `examples/lock-manager-model`\n  - Smallest end-to-end example for TLA+-style system modeling in Rust\n- `examples/deadlock-formal-model`\n  - Intentional formal failure example that reaches a deadlock and makes `formal_tests` fail\n- `examples/docker-compose-model`\n  - Larger example that adds docgen output, a richer runtime, and a more operational state\n    machine\n\n## Tooling\n\n- `cargo nirvash list-tests`\n- `cargo nirvash materialize-tests`\n- `cargo nirvash replay`\n\nGenerated artifacts are written under `target/nirvash/{manifest,replay}`. Materialized\nreplay files are written to `tests/generated/*.rs`, and `tests/generated.rs` is refreshed\nso Cargo can run them as an integration test crate.\n\n## Development\n\n```bash\ncargo fmt --all --check\ncargo check --workspace\ncargo test --workspace\n```\n\nFor the first standalone `0.1.0` line, unpublished sibling crates are still resolved through a\ntemporary local `[patch.crates-io]` overlay during packaging. The CI workflow generates that\noverlay before running the workspace `cargo package` step.\n\nOptional engines such as `loom` and `shuttle` remain opt-in. The default workspace\nchecks do not require them.\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyieldspace%2Fnirvash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyieldspace%2Fnirvash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyieldspace%2Fnirvash/lists"}