{"id":35031518,"url":"https://github.com/phoenixr-codes/rhai-env","last_synced_at":"2026-05-21T06:38:38.694Z","repository":{"id":268781987,"uuid":"905465117","full_name":"phoenixr-codes/rhai-env","owner":"phoenixr-codes","description":"Provides inspection and manipulation utilties of the process's environment for the Rhai scripting language.","archived":false,"fork":false,"pushed_at":"2024-12-18T22:44:36.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-11T21:59:01.162Z","etag":null,"topics":["enbedded","rhai","rust","script"],"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/phoenixr-codes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE.txt","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":"2024-12-18T22:08:58.000Z","updated_at":"2025-01-08T14:02:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"561a6fa5-0218-4167-a165-ec61b0bff73d","html_url":"https://github.com/phoenixr-codes/rhai-env","commit_stats":null,"previous_names":["phoenixr-codes/rhai-env"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/phoenixr-codes/rhai-env","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixr-codes%2Frhai-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixr-codes%2Frhai-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixr-codes%2Frhai-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixr-codes%2Frhai-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phoenixr-codes","download_url":"https://codeload.github.com/phoenixr-codes/rhai-env/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixr-codes%2Frhai-env/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33291047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T02:57:32.698Z","status":"ssl_error","status_checked_at":"2026-05-21T02:57:31.990Z","response_time":62,"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":["enbedded","rhai","rust","script"],"created_at":"2025-12-27T07:11:15.708Z","updated_at":"2026-05-21T06:38:38.675Z","avatar_url":"https://github.com/phoenixr-codes.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About `rhai-env`\n\n[![crates.io](https://img.shields.io/crates/v/rhai-env?logo=rust)](https://crates.io/crates/rhai-env/)\n[![crates.io](https://img.shields.io/crates/d/rhai-env?logo=rust)](https://crates.io/crates/rhai-env/)\n[![API Docs](https://docs.rs/rhai-env/badge.svg?logo=docs-rs)](https://docs.rs/rhai-env/)\n\nThis crate provides inspection and manipulation utilties of the process's environment for the\n[Rhai] scripting language.\n\nThis crate is heavily inspired by [rhai-fs][].\n\n## Usage\n\n### `Cargo.toml`\n\n```toml\n[dependencies]\nrhai-env = \"0.1.2\"\n```\n\n### [Rhai] script\n\n```js\nlet foo = read_env(\"FOO\");\nset_env(\"BAR\", \"blah\");\n```\n\n### Rust source\n\n```rust\nuse rhai::{Engine, EvalAltResult};\nuse rhai::packages::Package;\nuse rhai_env::EnvironmentPackage;\n\nfn main() -\u003e Result\u003c(), Box\u003cEvalAltResult\u003e\u003e {\n    // Create Rhai scripting engine\n    let mut engine = Engine::new();\n\n    // Create environment package and add the package into the engine\n    let package = EnvironmentPackage::new();\n    package.register_into_engine(\u0026mut engine);\n\n    // Print the value of the environment variable `PATH`.\n    let value = engine.eval::\u003cString\u003e(r#\"env(\"PATH\")\"#)?;\n    println!(\"{}\", value);\n\n    Ok(())\n}\n```\n\n## Features\n\n|  Feature   | Default  | Description                                          |\n| :--------: | :------: | ---------------------------------------------------- |\n| `no_index` | disabled | Enables support for `no_index` builds of [Rhai]      |\n|   `sync`   | disabled | Enables support for `sync` builds of [Rhai]          |\n| `metadata` | disabled | Enables support for generating package documentation |\n\n[Rhai]: https://rhai.rs\n[rhai-fs]: https://github.com/rhaiscript/rhai-fs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoenixr-codes%2Frhai-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphoenixr-codes%2Frhai-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoenixr-codes%2Frhai-env/lists"}