Skip to content
Skills Library
Programming · Analysis

analyze-rust-ffi-crate-surface

/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.

Repository
RediSearch ↗
Licence
AGPL-3.0
Last repository change
27.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.

What it does and when to use it

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.

Original author description

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.

How it works

  1. Arguments
  2. Instructions
  3. Auto-generated header files
Original SKILL.md headings · 33 lines, 285 words
SKILL.md preview
---
name: analyze-rust-ffi-crate-surface
description: 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.
---

# 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/redisearch_rs/c_entrypoint` directory. E.g. `numeric_range_tree_ffi` becomes `src/redisearch_rs/numeric_range_tree_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/redisearch_rs/headers`, generated from rustdoc by the `cheadergen` CLI (configured in `src/redisearch_rs/cheadergen.toml`, invoked from `src/redisearch_rs/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.

Versions

The database has no other skills named analyze-rust-ffi-crate-surface.

Database snapshot: 13.11.2026 · package version b69739843bc5 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90minimize-rust-ffi-crate-surface
    Remove Rust-defined C symbols that are either unused or only used in C/C++ unit tests. Use this when you are refactoring a Rust FFI crate and want to remove unused symbols.
  • 90rust-security-review
    Use when asked for a Rust security or correctness audit of a crate, service, or library with unsafe, FFI, concurrency, async, or untrusted-input code. Not for general review: use security-review.
  • 86rust-review
    Use when reviewing Rust code, a Rust diff or a crate before it lands, or when asked whether Rust code is sound or idiomatic.
  • 100test-ffi-surface
    Build and test the NeMo Relay FFI surface; use this for crates/ffi changes, header generation, or ABI-facing validation
  • 100rust
    Guides Rust code across ownership, async cancellation, unsafe/FFI and Cargo features. Use when editing .rs or Cargo.toml, fixing borrow-checker or non-Send future errors, losing work inside select!, reviewing unsafe wrappers or FFI callbacks, or a crate builds only inside its workspace.
  • 100rust-ffi
    Use when calling C libraries from Rust, generating bindings with bindgen, exporting Rust functions to C with cbindgen, writing safe wrappers over unsafe FFI, or linking system libraries.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.