Building SEGUL GUI from source
For most users, building the GUI version from source may not be necessary. However, this guide is useful if you wish to contribute to the project or build similar apps.
Prerequisites
Section titled “Prerequisites”The GUI version of SEGUL is built using the Flutter framework. We use Dart as the programming language for the GUI. The Dart code communicates with the SEGUL core library via a foreign function interface (FFI). We simplify this process by using the Flutter Rust Bridge (FRB) library that generates the FFI code for us. Learn more about the SEGUL architecture here.
To build the GUI version of SEGUL, install the following tools:
- Flutter SDK
- Rust
- Flutter Rust Bridge
- Android Studio
- Xcode (for iOS/iPadOS/macOS builds)
- Visual Studio Code (recommended)
- Visual Studio (for Windows builds)`
- Git
- GH CLI (recommended)
Install Flutter
Section titled “Install Flutter”Follow the instructions to install Flutter here. It will also guide you to install Android Studio and other required dependencies.
Install Rust
Section titled “Install Rust”Install Rust with rustup. SEGUI builds its Rust library through Flutter native assets, which requires rustup. The rust/rust-toolchain.toml file pins the Rust version and targets, and rustup installs them on the first build. Flutter then compiles the Rust library during flutter run, flutter test, and flutter build, so the first build takes several minutes.
Install Flutter Rust Bridge
Section titled “Install Flutter Rust Bridge”Follow the instructions to install Flutter Rust Bridge (FRB) here. We use FRB v2. You will need to install the CLI tool through Cargo and the FRB package for Flutter. Keep in mind that the version of the FRB CLI tool and the FRB package must match.
Clone the repository
Section titled “Clone the repository”We use GitHub CLI tool here.
gh repo clone hhandika/seguiIf you are using git:
git clone https://github.com/hhandika/segui.gitThen, change the directory to segui directory. Install Flutter dependencies:
cd segui
flutter pub getRun the app
Section titled “Run the app”flutter runBuild for windows
Section titled “Build for windows”flutter build windows --releaseBuild for Apple Devices
Section titled “Build for Apple Devices”You need to have a macOS machine and Xcode installed to build for Apple Devices.
Install Xcode
Section titled “Install Xcode”Follow the instructions to install Xcode here.
Build SEGUI for macOS
Section titled “Build SEGUI for macOS”flutter build macos --releaseBuild for iOS/iPadOS
Section titled “Build for iOS/iPadOS”flutter build ios --releaseBuild for Linux
Section titled “Build for Linux”Install Linux dependencies
Section titled “Install Linux dependencies”Follow the instructions to install Linux dependencies here.
flutter build linux --releaseBuild for Android
Section titled “Build for Android”flutter build apk --releaseCopyright © 2026 H. Handika & J. A. Esselstyn.
This material is based upon work supported by the National Science Foundation under grant numbers: DEB-1754393 and DEB-2244754. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.