{"id":13503166,"url":"https://github.com/dflemstr/realize","last_synced_at":"2025-07-03T12:06:31.972Z","repository":{"id":62443788,"uuid":"77628495","full_name":"dflemstr/realize","owner":"dflemstr","description":null,"archived":false,"fork":false,"pushed_at":"2018-08-19T15:15:25.000Z","size":149,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T22:11:27.795Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dflemstr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-29T17:26:09.000Z","updated_at":"2021-08-08T20:00:40.000Z","dependencies_parsed_at":"2022-11-01T23:33:26.499Z","dependency_job_id":null,"html_url":"https://github.com/dflemstr/realize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dflemstr/realize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflemstr%2Frealize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflemstr%2Frealize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflemstr%2Frealize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflemstr%2Frealize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dflemstr","download_url":"https://codeload.github.com/dflemstr/realize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflemstr%2Frealize/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263322846,"owners_count":23448718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-07-31T22:02:39.711Z","updated_at":"2025-07-03T12:06:31.946Z","avatar_url":"https://github.com/dflemstr.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# `realize` [![crates.io badge](https://img.shields.io/crates/v/realize.svg)](https://crates.io/crates/realize) [![docs.rs badge](https://docs.rs/realize/badge.svg)](https://docs.rs/realize)\n\n`realize` is a blazingly fast configuration management library written in Rust.\nIt exposes a type-safe eDSL for writing system configuration programs.\n\n# Features\n\nThe goal of `realize` is to allow you to write flexible system configurations\nusing the full power of Rust. You can then deploy this configuration to any\nother machine as a statically linked executable and run it to apply needed\nchanges without having to install any other dependencies.\n\nThis is different from other similar configuration management tools such as\nAnsible, Puppet or Chef, which have significant system dependencies, and\ninterpret the configuration on the target machine in a dynamic way, which can\nlead to errors that a type system can alleviate.\n\n# Example\n\nHere is an example `realize` configuration (see the `examples` directory for\nmore):\n\n```rust\nextern crate realize;\n\nuse realize::fs;\n\nfn main() {\n    realize::apply(configuration)\n}\n\nfn configuration(reality: \u0026mut realize::Reality) {\n    reality.ensure(fs::File::at(\"/etc/hostname\").contains_str(\"dflemstr-desktop\"));\n    // Include the ’files/etc/passwd’ file in the static binary so that the\n    // configuration is truly dependency-free\n    reality.ensure(fs::File::at(\"/etc/passwd\").contains_str(include_str!(\"files/etc/passwd\")));\n}\n```\n\nExample output (not from the above example, but another one):\n\n![example output](./image/realize-screenshot.png)\n\n# Getting started\n\n[Install Rust](https://www.rust-lang.org/install.html) (only needed on your\ndevelopment machine) and then create a new crate for your configuration:\n\n    $ cargo new --bin myconfig\n    $ cd myconfig\n    \nNow, declare a dependency on `realize` in your `Cargo.toml` file:\n\n    [dependencies]\n    realize = \"*\"\n\nYou’re now ready to put your configuration in `src/main.rs`.  To apply the configuration locally, just run:\n\n    $ cargo run\n\nTo get a binary that can be deployed elsewhere, build a release binary:\n\n    $ cargo build --release\n\nThe resulting binary is in `target/release/myconfig`.\n\nThis binary still depends on your operating system’s LIBC version. To get a\ntruly dependency free binary, first install [musl](https://www.musl-libc.org/)\nusing your operating system’s package manager, then cross compile the binary to\nmusl:\n\n    $ rustup target add x86_64-unknown-linux-musl\n    $ cargo build --release --target x86_64-unknown-linux-musl\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflemstr%2Frealize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdflemstr%2Frealize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflemstr%2Frealize/lists"}