Builds Rust native libraries for cross-platform integration.

Install

mkdir -p .claude/skills/rust-build && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11958" && unzip -o skill.zip -d .claude/skills/rust-build && rm skill.zip

Installs to .claude/skills/rust-build

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Build Rust native libraries for the FFI plugin
46 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Build Rust native libraries for specified target platforms
  • Add rustup targets for cross-compilation
  • Compile Rust code in release mode
  • Report build success or errors
  • Regenerate Dart bindings after Rust API modifications

How it works

The skill changes to the Rust plugin directory, adds the specified rustup target, and then builds the library using 'cargo build' for that target in release mode.

Inputs & outputs

You give it
An optional target platform (e.g., 'ios', 'android', 'linux', 'windows', 'macos')
You get back
Compiled Rust native libraries for the specified target, or an error report if the build fails

When to use rust-build

  • Build native libraries for mobile
  • Compile Rust for cross-platform FFI
  • Prepare FFI binary assets

About this skill

Build the Rust native libraries for the keychat_rust_ffi_plugin.

Arguments

  • $ARGUMENTS - Target platform: ios, android, linux, windows, macos

Prerequisites

Ensure flutter_rust_bridge codegen is installed:

cargo install [email protected]

For Linux, install system dependencies:

apt install protobuf-compiler libsecret-1-dev

Target Setup and Build Commands

PlatformTargetSetup & Build
iOSaarch64-apple-iosrustup target add aarch64-apple-ios && cargo build --target aarch64-apple-ios --release
Androidaarch64-linux-androidrustup target add aarch64-linux-android && cargo build --target aarch64-linux-android --release
Linuxx86_64-unknown-linux-gnurustup target add x86_64-unknown-linux-gnu && cargo build --target x86_64-unknown-linux-gnu --release
Windowsx86_64-pc-windows-msvcrustup target add x86_64-pc-windows-msvc && cargo build --target x86_64-pc-windows-msvc --release
macOSaarch64-apple-darwinrustup target add aarch64-apple-darwin && cargo build --target aarch64-apple-darwin --release

Workflow

  1. Change to the Rust plugin directory:

    cd packages/keychat_rust_ffi_plugin/rust
    
  2. If no target specified, ask which platform to build for

  3. Add the rustup target if not already added:

    rustup target add <target>
    
  4. Build the library:

    cargo build --target <target> --release --target-dir target
    
  5. Report build success or any errors

Regenerating Dart Bindings

After modifying Rust API files, regenerate the Dart bindings:

cd packages/keychat_rust_ffi_plugin
flutter_rust_bridge_codegen generate

When not to use it

  • When the user does not specify a target platform for the build
  • When flutter_rust_bridge codegen is not installed
  • When system dependencies for Linux are not installed

Prerequisites

[email protected]protobuf-compilerlibsecret-1-dev

Limitations

  • It requires `flutter_rust_bridge_codegen` to be installed.
  • It requires specific system dependencies for Linux builds.
  • It needs a target platform to be specified for the build.

How it compares

This skill automates the cross-compilation of Rust FFI libraries for multiple platforms, unlike manually configuring and building for each target.

Compared to similar skills

rust-build side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
rust-build (this skill)05moReviewIntermediate
hula-skill37moReviewIntermediate
release-bump15moNo flagsBeginner
domain-iot16moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry