- Add CodexRuntime for process management and JSON-RPC communication - Add CodexConfigBridge for AI Gateway configuration - Add ModeSwitcher for OpenClaw Gateway mode switching (local/remote/offline) - Add AgentRegistry for agent registration and discovery - Add RuntimeCoordinator for unified coordination - Add Rust FFI bindings for native integration - Add comprehensive test coverage Phase 1-4 features: - Configuration bridging to AI Gateway - Mode switching between local/remote/offline - Agent registration protocol - Cloud memory sync capability - Offline fallback support CI/CD: - GitHub Actions workflow for Rust FFI build - Build scripts for macOS universal binary - Integration with Flutter build process Co-authored-by: Codex CLI Integration <codex@openai.com>
34 lines
961 B
Bash
Executable File
34 lines
961 B
Bash
Executable File
#!/bin/bash
|
|
# Generate FFI bindings using flutter_rust_bridge
|
|
# Usage: ./scripts/generate_ffi_bindings.sh
|
|
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
|
|
echo "Generating FFI bindings..."
|
|
|
|
# Check if flutter_rust_bridge is installed
|
|
if ! command -v flutter_rust_bridge_codegen &> /dev/null; then
|
|
echo "Installing flutter_rust_bridge_codegen..."
|
|
cargo install flutter_rust_bridge_codegen --version 2.0.0
|
|
fi
|
|
|
|
# Generate bindings
|
|
cd "$PROJECT_ROOT"
|
|
|
|
flutter_rust_bridge_codegen \
|
|
--rust-input rust/src/lib.rs \
|
|
--dart-output lib/runtime/codex_ffi_generated.dart \
|
|
--dart-format-line-length 120 \
|
|
--c-symbol-prefix codex_
|
|
|
|
echo "FFI bindings generated!"
|
|
echo "Dart output: lib/runtime/codex_ffi_generated.dart"
|
|
|
|
# Generate C header for reference
|
|
cbindgen rust/src/lib.rs -o rust/codex_ffi.h 2>/dev/null || echo "cbindgen not installed, skipping C header generation"
|
|
|
|
echo "Done!"
|