rust-build
1
总安装量
1
周安装量
#76206
全站排名
安装命令
npx skills add https://github.com/keychat-io/keychat-app --skill rust-build
Agent 安装分布
mcpjam
1
claude-code
1
replit
1
junie
1
windsurf
1
zencoder
1
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 flutter_rust_bridge_codegen@2.11.1
For Linux, install system dependencies:
apt install protobuf-compiler libsecret-1-dev
Target Setup and Build Commands
| Platform | Target | Setup & Build |
|---|---|---|
| iOS | aarch64-apple-ios | rustup target add aarch64-apple-ios && cargo build --target aarch64-apple-ios --release |
| Android | aarch64-linux-android | rustup target add aarch64-linux-android && cargo build --target aarch64-linux-android --release |
| Linux | x86_64-unknown-linux-gnu | rustup target add x86_64-unknown-linux-gnu && cargo build --target x86_64-unknown-linux-gnu --release |
| Windows | x86_64-pc-windows-msvc | rustup target add x86_64-pc-windows-msvc && cargo build --target x86_64-pc-windows-msvc --release |
| macOS | aarch64-apple-darwin | rustup target add aarch64-apple-darwin && cargo build --target aarch64-apple-darwin --release |
Workflow
-
Change to the Rust plugin directory:
cd packages/keychat_rust_ffi_plugin/rust -
If no target specified, ask which platform to build for
-
Add the rustup target if not already added:
rustup target add <target> -
Build the library:
cargo build --target <target> --release --target-dir target -
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