smithery.ai

analyze-rust-ffi-crate-surface

Determine which parts of the C codebase use Rust-defined C symbols. Use this when you want to understand which C code files may be impacted by changes to a Rust FFI crate.

First seen Mar 21, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,097 B
  • docs SUMMARY.md 105 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Analyze Rust FFI Crate Surface

Compile a list of all C-visible symbols defined in a given Rust FFI crate or file (e.g. an extern "C" fn annotated with #[unsafe(no_mangle)] or a type definition). Then determine which parts of the C codebase use these symbols.

Arguments

  • <path>: Path to the Rust crate or file.
  • <path 1> <path 2>: Multiple Rust crates/files.

If the path doesn't start with src/, assume it to be in the src/redisearchrs/centrypoint directory. E.g. numericrangetreeffi becomes src/redisearchrs/numericrangetree_ffi. If the path points to a directory, review the documentation of all Rust files in that directory.

Instructions

  • Read the relevant Rust source files.
  • Compile a list of all the FFI symbols defined they expose (e.g. extern "C" fn annotated with #[unsafe(no_mangle)] or type definitions).

You can use the corresponding auto-generated header file in src/redisearch_rs/headers, if it helps.

  • For each symbol, determine which modules in the C codebase use it:

- For functions, look for calls to the function in the C codebase. - For types, check out if they are used as function arguments, field types, or in type casts.

Emit a report that lists, for each symbol, the following information:

  • The symbol name.
  • The module(s) in the C codebase that use it.
  • The type(s) of the symbol (function, type, etc.).
  • If it's only used in C/C++ unit tests (i.e. under `tests/)

Auto-generated header files

Each *ffi Rust crate has a corresponding auto-generated header file in src/redisearchrs/headers, generated from rustdoc by the cheadergen CLI (configured in src/redisearchrs/cheadergen.toml, invoked from src/redisearchrs/CMakeLists.txt). The auto-generated header file includes all the FFI symbols defined by the Rust crate, no matter the sub-module they are defined in.