Skip to content

Conversation

@AvivDavid23
Copy link
Collaborator

@AvivDavid23 AvivDavid23 commented Nov 11, 2025

Note

Adds proc-macro and runtime support for declaring command argument specs and ACL categories, and moves AclCategory to a new common crate.

  • Procedural macros (redismodule-rs-macros):
    • redis_command! proc-macro: accepts args (typed arg specs with flags/subargs) and acl_categories; generates CommandInfo with command_args and ACL categories.
  • Runtime commands API (src/context/commands.rs):
    • Add CommandArgFlags, RedisModuleCommandArg, conversion to raw, and memory free helpers; expose get_redis_command_args.
    • Extend CommandInfo to include args and optional acl_categories; set via RedisModule_SetCommandInfo and RedisModule_SetCommandACLCategories.
  • Refactor:
    • Move AclCategory to new common crate and re-export from src/lib.rs; remove old definition from src/context/mod.rs.
    • Make redis_module! macro commands section optional and adjust command registration usage.
  • Cargo:
    • Add common crate dependency to workspace and macros crate.

Written by Cursor Bugbot for commit 8908078. This will update automatically on new commits. Configure here.

@AvivDavid23 AvivDavid23 merged commit f65b1db into master Nov 11, 2025
18 checks passed
@AvivDavid23 AvivDavid23 deleted the MOD-8720 branch November 11, 2025 11:23
AvivDavid23 added a commit that referenced this pull request Nov 11, 2025
MOD-8720 command proc macro: add acl and command arguments parameters

(cherry picked from commit f65b1db)
AvivDavid23 added a commit that referenced this pull request Nov 11, 2025
Merge pull request #432 from RedisLabsModules/MOD-8720
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants