{"id":21235736,"url":"https://github.com/darfink/region-rs","last_synced_at":"2025-04-12T15:42:57.197Z","repository":{"id":12809457,"uuid":"72875582","full_name":"darfink/region-rs","owner":"darfink","description":"A cross-platform virtual memory API written in Rust","archived":false,"fork":false,"pushed_at":"2024-06-11T10:14:49.000Z","size":4179,"stargazers_count":126,"open_issues_count":7,"forks_count":24,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-03T16:13:52.695Z","etag":null,"topics":["memory-region","mlock","mprotect","virtualprotect","virtualquery"],"latest_commit_sha":null,"homepage":"https://darfink.github.io/region-rs/","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/darfink.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2016-11-04T18:39:52.000Z","updated_at":"2025-03-21T04:54:29.000Z","dependencies_parsed_at":"2024-06-12T11:02:35.853Z","dependency_job_id":null,"html_url":"https://github.com/darfink/region-rs","commit_stats":{"total_commits":198,"total_committers":7,"mean_commits":"28.285714285714285","dds":"0.19191919191919193","last_synced_commit":"5087445f08b3f78c481fb8cde18b47bb67d5eb22"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darfink%2Fregion-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darfink%2Fregion-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darfink%2Fregion-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darfink%2Fregion-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darfink","download_url":"https://codeload.github.com/darfink/region-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248590932,"owners_count":21129916,"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":["memory-region","mlock","mprotect","virtualprotect","virtualquery"],"created_at":"2024-11-21T00:02:49.066Z","updated_at":"2025-04-12T15:42:57.178Z","avatar_url":"https://github.com/darfink.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# `region-rs`\n\n## Cross-platform virtual memory API\n\n[![GitHub CI Status][github-shield]][github]\n[![crates.io version][crate-shield]][crate]\n[![Documentation][docs-shield]][docs]\n[![License][license-shield]][license]\n\n \u003c/div\u003e\n\nThis crate provides a cross-platform Rust API for allocating, querying and\nmanipulating virtual memory. It is a thin abstraction, with the underlying\ninteraction implemented using platform specific APIs (e.g `VirtualQuery`,\n`VirtualAlloc`, `VirtualLock`, `mprotect`, `mmap`, `mlock`).\n\n## Platforms\n\nThis library is continuously tested against these targets:\n\n- Linux\n  * `aarch64-linux-android`\n  * `armv7-unknown-linux-gnueabihf`\n  * `i686-unknown-linux-gnu`\n  * `mips-unknown-linux-gnu`\n  * `x86_64-unknown-linux-gnu`\n  * `x86_64-unknown-linux-musl`\n- Windows\n  * `i686-pc-windows-gnu`\n  * `i686-pc-windows-msvc`\n  * `x86_64-pc-windows-gnu`\n  * `x86_64-pc-windows-msvc`\n- macOS\n  * `x86_64-apple-darwin`\n- NetBSD\n  * `x86_64-unknown-netbsd`\n- FreeBSD\n  * `x86_64-unknown-freebsd`\n- OpenBSD\n  * `x86_64-unknown-openbsd`\n\n... and continuously checked against these targets:\n\n- Illumos\n  * `x86_64-unknown-illumos`\n\nBeyond the aformentioned target triplets, the library is also expected to work\nagainst a multitude of omitted architectures.\n\n## Installation\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nregion = \"3.0.2\"\n```\n\n## Example\n\n- Cross-platform equivalents:\n```rust\nlet data = [0xDE, 0xAD, 0xBE, 0xEF];\n\n// Page size\nlet pz = region::page::size();\n\n// VirtualQuery | '/proc/self/maps'\nlet q  = region::query(data.as_ptr())?;\nlet qr = region::query_range(data.as_ptr(), data.len())?;\n\n// VirtualAlloc | mmap\nlet alloc = region::alloc(100, Protection::READ_WRITE)?;\n\n// VirtualProtect | mprotect\nregion::protect(data.as_ptr(), data.len(), Protection::READ_WRITE_EXECUTE)?;\n\n// ... you can also temporarily change one or more pages' protection\nlet handle = region::protect_with_handle(data.as_ptr(), data.len(), Protection::READ_WRITE_EXECUTE)?;\n\n// VirtualLock | mlock\nlet guard = region::lock(data.as_ptr(), data.len())?;\n```\n\n\u003c!-- Links --\u003e\n[github-shield]: https://img.shields.io/github/actions/workflow/status/darfink/region-rs/ci.yml?branch=master\u0026label=actions\u0026logo=github\u0026style=for-the-badge\n[github]: https://github.com/darfink/region-rs/actions/workflows/ci.yml?query=branch%3Amaster\n[crate-shield]: https://img.shields.io/crates/v/region.svg?style=for-the-badge\n[crate]: https://crates.io/crates/region\n[docs-shield]: https://img.shields.io/badge/docs-crates-green.svg?style=for-the-badge\n[docs]: https://docs.rs/region/\n[license-shield]: https://img.shields.io/crates/l/region.svg?style=for-the-badge\n[license]: https://github.com/darfink/region-rs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarfink%2Fregion-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarfink%2Fregion-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarfink%2Fregion-rs/lists"}