Skip to content

thlorenz/workout-frs

Repository files navigation

workout

Workout Project written in Flutter and Rust.

Getting Started

Make sure you got cargo-make installed (cargo install cargo-make).

Init build deps

cargo make init

NOTE: We are using cbindgen and dart-bindgen as global commands. Using them as dep-dependencies instead via their API causes compile times of the project containing the build.rs to go up.

Build and Integrate Android Rust Crate(s)

cargo make android

Similarly for ios and macos.

Start Flutter App

For example to start the app in a MacOS Desktop do:

flutter run -d "`flutter devices list | grep macOS | head -c5`"

Devlog

Flutter app created via:

flutter create --platforms android,ios workout

Rust crates created via:

cargo new --lib native/workout
cargo new --lib native/workout-ffi

Flutter plugin package created via:

flutter create  --platforms ios,android,macos --template=plugin packages/workout_ffi

Ensure to add the ffi lib as a dependency of the plugin and then run:

(cd packages/workout_ffi && flutter pub get)

Modify ios setup to make things work, see this commit:

  • ios/Classes/SwiftWorkoutFfiPlugin.swift
  • ios/workout_ffi.podspec

In some cases it helps to run flutter clean if the add method (or whichever you are exposing) is not found.

About

Workout Project written in Flutter and Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published