Skip to main content

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

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:

Install Flutter

Follow the instructions to install Flutter here. It will also guide you to install Android Studio and other required dependencies.

Install Rust

Follow the instructions to install Rust here.

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

We use GitHub CLI tool here.

gh repo clone hhandika/segui

If you are using git:

git clone https://github.com/hhandika/segui.git

Then, change the directory to segui directory. Install Flutter dependencies:

cd segui

flutter pub get

Run the app


flutter run

Build for windows

flutter build windows --release

Build for Apple Devices

You need to have a macOS machine and Xcode installed to build for Apple Devices.

Install Xcode

Follow the instructions to install Xcode here.

Build SEGUI for macOS

flutter build macos --release

Build for iOS/iPadOS

flutter build ios --release

Build for Linux

Install Linux dependencies

Follow the instructions to install Linux dependencies here.

flutter build linux --release

Build for Android

flutter build apk --release