Hot reload Rust backend logic inside mobile apps — no rebuilds, no reinstalls.
Getting Started • Architecture • Documentation • Roadmap • Contributing
Befu is a high-performance cross-platform framework for building mobile and web applications using React or SolidJS for the UI and Rust for business logic. It features a custom, low-latency bridge and a dynamic hot-reload system for native code.
- Zero-Click Hot Reload: Update native Rust logic on-device in approximately 1 second without full app rebuilds or reinstalls.
- Framework Agnostic: Native support for React and SolidJS.
- Typed Bridge: High-performance communication layer between WebView and Rust.
- Modern Scaffolding: Create complete cross-platform monorepos instantly via
create-befu-app. - Engineering Tools: Built-in
doctorandbootstrapscripts to automate environment management.
Edit a Rust command and save; the application updates instantly without losing internal state.
Traditional mobile development involves significant wait times for Gradle or Xcode builds following every backend or business logic change. Befu eliminates this friction:
- Save Rust to update the application instantly.
- Unified development across platforms.
- Persistent mobile app environment during logic swaps.
- Native performance with web-like iteration speeds.
Define high-performance logic using procedural macros:
#[befu::command]
fn calculate_fast(args: MyArgs) -> MyResult {
// Rust computation logic
MyResult { score: 100 }
}Invoke native code with a typed promise API:
import { invoke } from '@befu/bridge'
const result = await invoke('calculate_fast', { id: 1 })
console.log(result.score) // 100| Feature | Android | iOS | Web |
|---|---|---|---|
| Bridge UI | ✅ | ✅ | ✅ |
| Hot Reload | ✅ (Side-loading) | ✅ (Vite HMR) | |
| Production | 🚧 Beta | 🚧 Alpha | ✅ Stable |
Note: iOS hot-reloading is currently limited to bundled logic due to App Store dynamic loading restrictions. We are prioritizing Android-first high-frequency DX.
Befu is designed with a strict "Dev vs Prod" boundary. The dynamic library loading required for hot-reloading is gated behind feature flags and is intended to be stripped from production binaries to eliminate remote code execution vectors.
Befu utilizes a dynamic-loading registry to swap logic at the binary boundary.
graph TD
UI[Web UI / React & Solid] -->|invoke| Bridge[Befu Bridge / TS]
Bridge -->|WebView Messaging| Core[Befu Core / Rust]
Core -->|Hot Dispatch| App[Befu App / Rust Logic]
Watcher[Rust Watcher / Scripts] -->|Sync Binaries| Files[App Sandbox]
Verify your system configuration for native Rust and mobile development:
bun run doctorInitialize dependencies and prepare platform-specific assets:
bun run bootstrapStart the full development cycle for your target platform:
bun run a:dev # Android Development
# OR
bun run i:dev # iOS DevelopmentAutomated project initialization using the official scaffolder:
bunx create-befu-app --name my-app --framework react --platform both --yesTip
If your local environment cache is stale, pin the latest release: bunx create-befu-app@0.1.5 [...]
Contributions from the community are encouraged. Refer to the Contributing Guide to begin.
Befu is open-source software licensed under the MIT License.
Made with love ❤️

