Galileo Flutter is a Flutter FFI plugin that integrates the Galileo mapping engine with Flutter applications. It allows Flutter apps to leverage the powerful Galileo mapping library through Rust FFI bindings.
- Flutter Layer (
./lib): Flutter/Dart abstractions and API - Interop Layer (
./rust/api): FFI functions and type definitions - Core Logic (
./rust/src): Core Rust implementation using the Galileo library
- galileo: Core mapping library (v0.2.1, git: https://github.com/galileo-map/galileo.git)
- flutter_rust_bridge: FFI bridge generator
- wgpu: WebGPU implementation for rendering
- irondash: Cross-platform texture handling
- Ensure Rust and Flutter are installed
- Install
flutter_rust_bridge_codegenif modifying Rust-Dart interop - Run
flutter_rust_bridge_codegen generateafter Rust API changes - Build with standard Flutter commands
cd example && flutter run: Run the example appcargo check: Check Rust compilationflutter pub get: Get Flutter dependenciesdart format .: Format Dart codecargo fmt: Format Rust code
- The project was moved out of the Galileo monorepo, so dependency paths were updated from local paths to git references
- TileSchema::test_schema() was replaced with TileSchema::web(19) due to API changes in the upstream Galileo library
- The example app requires desktop variant when running (not web)
- Adding new API functions: Define in
./rust/apiand regenerate withflutter_rust_bridge_codegen - Modifying rendering: Look at
./rust/src/core/windowless_renderer.rsand texture handling - Working with maps: Check
./rust/src/core/galileo_ref.rsand./rust/src/core/map_session.rs
galileo_flutter/
├── lib/ # Flutter/Dart code
├── rust/
│ ├── src/
│ │ ├── api/ # API definitions for FFI
│ │ ├── core/ # Core implementation
│ │ └── ... # Other Rust modules
│ └── Cargo.toml # Rust dependencies
├── example/ # Example Flutter app
├── test_driver/ # Integration tests
└── ...
flutter_rust_bridge.yaml: FFI bridge configurationpubspec.yaml: Flutter dependenciesrust/Cargo.toml: Rust dependencies