Prerequisites
Before building, ensure you have completed the development environment setup.All commands should be run from the
frontend/ directory.Quick Start
1
Navigate to frontend
2
Build for your platform
- macOS
- Windows
- Linux
3
Run Flutter app
Build Profiles
AppFlowy usescargo-make with different build profiles:
Building the Rust Backend
Development Build
- macOS
- Windows
- Linux
1
Choose architecture
2
Build Rust backend
- Compiles the Rust backend as a static library
- Copies the library to the Flutter app
- Generates FFI bindings
macOS builds use staticlib (.a) for better integration with the app bundle.
Production Build
Production builds are optimized with LTO and higher optimization levels:Building the Flutter App
Development Mode
1
Navigate to Flutter directory
2
Install dependencies
3
Generate code
4
Run the app
Release Build
- macOS
- Windows
- Linux
Build Configuration
Makefile.toml
The build process is configured infrontend/Makefile.toml:
Environment Variables
Key environment variables:Platform-Specific Details
- macOS
- Windows
- Linux
macOS Build Details
Crate Type: Static library (.a)Build Targets:aarch64-apple-darwin(Apple Silicon)x86_64-apple-darwin(Intel)
Clean Build
To clean all build artifacts:Troubleshooting
Rust Build Fails
Flutter Build Fails
Library Not Found
- macOS
- Windows
- Linux
Protobuf Errors
Performance Optimization
Build Times
To improve build times:1
Use incremental compilation
2
Use cargo cache
3
Parallel jobs
Release Optimization
The production profile uses:Next Steps
Building Mobile
Build AppFlowy for iOS and Android
Testing
Learn how to run tests
Contributing
Contribute your changes
Code Style
Follow coding conventions