Syslab Deploy is a template project for integrating Syslab/Julia programs into cross-platform GUI apps.
Features:
- Out-of-the-box support for Windows, macOS, Linux and Android (iOS not tested)
- One line build command to compile Julia code into a static library for each platform
- Support 32-bit ARM embedded devices (used by Flutter Android debug build)
- Build for Windows:
flutter build windows
- Build for Android:
flutter build apk --split-per-abi
-
julia/
:julia/build.jl
contains the entrypoint for building Julia code into a static library. Runningjulia/compile.sh
will build the library into a C++ project located innative/syslabcc_lib/syslabcc_lib/
. -
native/syslabcc_lib/
: Integrating the generated C++ project using Rust's cargokit/rinf toolchain. If you export different symbols from Julia, you might modify thelib.rs
file:#[link(name = "syslabcc_lib", kind = "static")] extern "C" { // you modify this according to the symbols you export from Julia #[allow(non_snake_case)] pub fn simulate( U: *mut f64, // Nt x Ny x Nx array u: *const f64, // Ny x Nx matrix n_x: i64, // number of rows n_y: i64, // number of columns n_t: i64, // number of time steps alpha: f64, // thermal diffusivity dx: f64, // spatial step size (x) dy: f64, // spatial step size (y) dt: f64, // time step size ) -> u8; }
-
native/hub
:This uses standard
rinf
structure, which implements the interops between Flutter and Julia exported functions. -
lib/
: This is the actual Flutter project which calls functions exported from your Julia library.
Julia programs bundled with Syslab Deploy do not have out-of-the-box support for BLAS-related functionalities on Android, iOS, or other embedded platforms.
Julia heavily uses shared libraries created by non-Julia programs, which is tricky to support when migrating the codebase to Android/iOS and embedded devices. This is the reason why we use --no-blas
option for SyslabCC.
To use BLAS-related functionalties, you need to create platform-specific binaries for the following native dependencies: