home / skills / redisearch / redisearch / build
This skill compiles the project to verify changes build successfully across c and rust builds, accelerating development feedback.
npx playbooks add skill redisearch/redisearch --skill buildReview the files below or copy the command above to add this skill to your agents.
---
name: build
description: Compile the project to verify changes build successfully
---
# Build Skill
Compile the project to verify changes build successfully.
## Usage
Run this skill after making code changes to verify they compile.
## Instructions
1. For a full build (C + Rust):
```bash
./build.sh
```
2. For Rust-only build (faster iteration):
```bash
cd src/redisearch_rs && cargo build
```
Always build the C code at least **once** before running the Rust-only build.
3. If build fails:
- Read the compiler errors carefully
- Fix the issues
- Re-run the build
4. If you update C code, re-build the C code before running the Rust-only build:
```bash
./build.sh
cd src/redisearch_rs && cargo build
```
## Clean Build
If you encounter strange build errors:
```bash
./build.sh FORCE
```
For Rust only:
```bash
cd src/redisearch_rs && cargo clean && cargo build
```
This skill compiles the project to verify code changes build successfully. It supports full builds (C + Rust) and faster Rust-only iteration, with helpers for clean and forced builds. Use it to catch compilation issues early and ensure native modules and Rust bindings are synchronized.
The skill runs the top-level build script for a complete C and Rust compilation, or invokes Cargo inside the Rust binding directory for Rust-only builds. It inspects compiler output and returns success/failure so you can iterate on errors. It also provides commands for forced rebuilds and cleaning Rust artifacts when build issues appear persistent.
Can I skip the C build when I only change Rust code?
Yes. For faster iteration, build only the Rust crate with cargo build in src/redisearch_rs, but ensure you’ve done a full C build at least once after C changes.
What should I do if the build still fails after fixes?
Double-check compiler messages, run a forced clean (./build.sh FORCE or cargo clean) and rebuild. If errors persist, isolate the failing component and reproduce with minimal changes.