smithery.ai

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

First seen Apr 3, 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 1,551 B
  • docs SUMMARY.md 125 B

History

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

SKILL.md

Minimize Rust FFI Crate Surface

Remove C symbols defined in a Rust FFI crate or file that are either unused or only used in C/C++ unit tests.

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

  • Use [analyze-rust-ffi-crate-surface](../analyze-rust-ffi-crate-surface/SKILL.md) to enumerate and analyze the usage of all the FFI symbols exposed by the Rust crate or file (e.g. extern "C" fn annotated with #[unsafe(no_mangle)] or type definitions).
  • For each unused symbol:

- Delete its Rust definition. - Run C/C++ unit tests to ensure the symbol was indeed unused (via ./build.sh RUNUNITTESTS)

  • For each symbol that is only used in C/C++ unit tests, elaborate a plan to either:

- Refactor the C/C++ unit tests not to use it. - Remove the C/C++ unit tests (or assertions) that rely on it, since they are prying into the implementation details of the Rust crate. - Keep the symbol, but mark it as "test only" in the Rust documentation.