{"id":16278583,"url":"https://github.com/sigoden/iredismodule","last_synced_at":"2025-04-07T21:19:12.606Z","repository":{"id":57634595,"uuid":"261806319","full_name":"sigoden/iredismodule","owner":"sigoden","description":"Create redis module with rust","archived":false,"fork":false,"pushed_at":"2020-05-25T08:12:48.000Z","size":391,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T14:04:41.207Z","etag":null,"topics":["redis","redis-module","rust"],"latest_commit_sha":null,"homepage":"","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/sigoden.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}},"created_at":"2020-05-06T15:46:36.000Z","updated_at":"2023-07-25T14:35:31.000Z","dependencies_parsed_at":"2022-09-26T20:20:33.234Z","dependency_job_id":null,"html_url":"https://github.com/sigoden/iredismodule","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Firedismodule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Firedismodule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Firedismodule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Firedismodule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sigoden","download_url":"https://codeload.github.com/sigoden/iredismodule/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247730063,"owners_count":20986404,"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":["redis","redis-module","rust"],"created_at":"2024-10-10T18:59:04.157Z","updated_at":"2025-04-07T21:19:12.539Z","avatar_url":"https://github.com/sigoden.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iredismodule\n\nThis crate provides an idiomatic Rust API for the [Redis Modules API](https://redis.io/topics/modules-intro).\nIt allows writing Redis modules in Rust, without needing to use raw pointers or unsafe code.\n\n## Get started\n\n```rust\nuse iredismodule_macros::rcmd;\nuse iredismodule::prelude::*; \n\n/// Define command\n#[rcmd(\"simple.hello\", \"readonly\", 0, 0, 0)] \nfn simple_hello(ctx: \u0026mut Context, _args: Vec\u003cRStr\u003e) -\u003e RResult {\n    let db = ctx.get_select_db();\n    Ok(db.into())\n}\n\n// Register module\ndefine_module! {\n    name: \"simple\",\n    version: 1,\n    data_types: [],\n    init_funcs: [],\n    commands: [\n        simple_hello_cmd,\n    ]\n}\n```\n\n## Running the example module\n\n1. [Install Rust](https://www.rust-lang.org/tools/install) \n2. [Install Redis](https://redis.io/download), most likely using your favorite package manager (Homebrew on Mac, APT or YUM on Linux)\n3. Run `cargo build --example helloworld`\n4. Start a redis server with the `helloworld` module \n   * Linux: `redis-server --loadmodule ./target/debug/examples/helloworld.so`\n   * Mac: `redis-server --loadmodule ./target/debug/examples/helloworld.dylib`\t\n5. Open a Redis CLI, and run `HELLO.SIMPLE`. \n\n## Writing your own module\n\nSee the [examples](examples) directory for some sample modules.\n\nThis crate tries to provide high-level wrappers around the standard Redis Modules API, while preserving the API's basic concepts.\nTherefore, following the [Redis Modules API](https://redis.io/topics/modules-intro) documentation will be mostly relevant here as well.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigoden%2Firedismodule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigoden%2Firedismodule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigoden%2Firedismodule/lists"}