{"id":39584735,"url":"https://github.com/GregoryConrad/rearch-rs","last_synced_at":"2026-01-26T15:01:15.488Z","repository":{"id":184722070,"uuid":"650913093","full_name":"GregoryConrad/rearch-rs","owner":"GregoryConrad","description":"Re-imagined approach to application design and architecture","archived":false,"fork":false,"pushed_at":"2025-12-27T23:32:24.000Z","size":746,"stargazers_count":88,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-13T22:32:59.681Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://crates.io/crates/rearch","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GregoryConrad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"GregoryConrad"}},"created_at":"2023-06-08T04:52:09.000Z","updated_at":"2026-01-09T18:22:49.000Z","dependencies_parsed_at":"2023-12-25T04:20:46.340Z","dependency_job_id":"d7c8ee54-e9ed-439e-b104-5bb8bc586e77","html_url":"https://github.com/GregoryConrad/rearch-rs","commit_stats":null,"previous_names":["gregoryconrad/rearch-rs"],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/GregoryConrad/rearch-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregoryConrad%2Frearch-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregoryConrad%2Frearch-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregoryConrad%2Frearch-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregoryConrad%2Frearch-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GregoryConrad","download_url":"https://codeload.github.com/GregoryConrad/rearch-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregoryConrad%2Frearch-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28781308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-18T07:35:27.099Z","updated_at":"2026-01-26T15:01:15.482Z","avatar_url":"https://github.com/GregoryConrad.png","language":"Rust","funding_links":["https://github.com/sponsors/GregoryConrad"],"categories":["\u003ca name=\"Rust\"\u003e\u003c/a\u003eRust"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/GregoryConrad/rearch-rs/actions\"\u003e\u003cimg src=\"https://github.com/GregoryConrad/rearch-rs/actions/workflows/test.yml/badge.svg\" alt=\"CI Status\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/GregoryConrad/rearch-rs\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/GregoryConrad/rearch-rs.svg?style=flat\u0026logo=github\u0026colorB=deeppink\u0026label=stars\" alt=\"Github Stars\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-purple.svg\" alt=\"MIT License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/GregoryConrad/rearch-docs/blob/main/assets/banner.jpg?raw=true\" width=\"75%\" alt=\"Banner\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nReArch = re-imagined approach to application design and architecture\n\n\u003e We must state definitions and provide for priorities and descriptions of data.\n\u003e We must state relationships, not procedures.\n\u003e\n\u003e -- Grace Murray Hopper, _Management and the Computer of the Future_ (1962)\n\u003c/p\u003e\n\n---\n\n\n## Features\nSpecifically, ReArch is a novel solution to:\n- ⚡️ State Management\n- 🧮 Incremental Computation\n- 🧱 Component-Based Software Engineering\n\nAnd with those, come:\n- Reactivity through declarative code\n- Loose coupling and high testability\n- App-level composability via a functional approach to dependency inversion\n- [Feature composition through _side effects_](https://blog.gsconrad.com/2023/12/22/the-problem-with-state-management.html)\n\n\n## In a Nutshell\nDefine your \"capsules\" (en-_capsulated_ pieces of state) at the top level:\n\n```rust\n// Capsules are simply functions that consume a CapsuleHandle.\n// The CapsuleHandle lets you get the state of other capsules,\n// in addition to using a large variety of side effects.\n\n// This capsule provides the count and a way to increment that count.\nfn count_manager(CapsuleHandle { register, .. }: CapsuleHandle) -\u003e (u8, impl CData + Fn()) {\n    let (count, set_count) = register(effects::state::\u003cCloned\u003c_\u003e\u003e(0));\n    let increment_count = move || set_count(count + 1);\n    (count, increment_count)\n}\n\n// This capsule provides the count, plus one.\nfn count_plus_one_capsule(CapsuleHandle { mut get, .. }: CapsuleHandle) -\u003e u8 {\n    let (count, _increment_count) = get(count_manager);\n    count + 1\n}\n\nlet container = Container::new();\n\nlet ((count, increment_count), count_plus_one) =\n    container.read((count_manager, count_plus_one_capsule));\nassert_eq!(count, 0);\nassert_eq!(count_plus_one, 1);\n\nincrement_count();\n\nlet ((count, _), count_plus_one) =\n    container.read((count_manager, count_plus_one_capsule));\nassert_eq!(count, 1);\nassert_eq!(count_plus_one, 2);\n```\n\n\u003e [!NOTE]\n\u003e The syntax used in the example above requires nightly for `unboxed_closures` and `fn_traits`,\n\u003e which is feature-gated under the `experimental-api` feature.\n\u003e Once `unboxed_closures` and `fn_traits` stabilize,\n\u003e this nightly syntax will be the preferred syntax,\n\u003e and this will no longer be feature-gated.\n\u003e (Without nightly, you must instead call the slightly more verbose\n\u003e `get.as_ref(some_capsule).clone()` and `register.register(effect())`.)\n\n\n## Getting Started\nSimply run:\n`cargo add rearch rearch-effects`\n\nThen, create one container for your application:\n```rust\nuse rearch::*;\nuse rearch_effects as effects;\n\nfn main() {\n  let container = Container::new();\n  // Use the container.\n}\n```\n\nAnd take a look at the [examples] to get an idea on how to make some of your own capsules!\n\n### Documentation\nAlso, there is some WIP [documentation] that will help you learn the core concepts behind ReArch!\n\n\n## Minimum Supported Rust Version (MSRV)\nThe MSRV is the current stable Rust version for all crates in this repo.\nAs such, any new release may require an updated Rust installation.\n\n\n## Help Wanted!\nAs much as I have done with ReArch, it always seems like there is more to do.\nOne person can only do so much!\n\nIf you would like to contribute, here are some areas where I would really appreciate help!\n- Documentation (especially inline!)\n  - If you could add code samples/improve clarity, that would be greatly appreciated.\n- New side effects!\n  - I've made many as I've needed them, but it'd be great to have more.\n  - If you find yourself using a custom side effect over and over, consider making a PR!\nChances are other developers can use it too.\n\n## Sponsors\nYou can become a sponsor of my work [here!](https://github.com/sponsors/GregoryConrad)\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/GregoryConrad/GregoryConrad/main/sponsorkit/sponsors.svg\"/\u003e\n\u003c/p\u003e\n\n[documentation]: https://rearch.gsconrad.com\n[examples]: https://github.com/GregoryConrad/rearch-rs/tree/main/examples\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGregoryConrad%2Frearch-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGregoryConrad%2Frearch-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGregoryConrad%2Frearch-rs/lists"}