Skip to content

Subsocial Flutter SDK built using Rust and Dart.

License

Notifications You must be signed in to change notification settings

shekohex/subsocial-flutter

 
 

Repository files navigation

Subsocial Flutter SDK

Usage

In your flutter project run the following commands to add the SDK to your project as a package.

git submodule add https://github.com/dappforce/subsocial-flutter.git packages/subsocial_sdk

then run the following command

./packages/subsocial_sdk/init.py

in your flutter project in pubspec.yml just add:

subsocial_sdk:
    path: packages/subsocial_sdk

then use the SDK as any other flutter package.

To Update the SDK Simply run:

git submodule foreach git pull origin main

then rerun the init.py script to fetch the latest native libs.

./packages/subsocial_sdk/init.py

To use a prerelese version of the SDK

then run the following command

./packages/subsocial_sdk/init.py --dev

it will also print the tag/release of this prerelese so make sure to switch the git module to that branch too.

cd ./packages/subsocial_sdk
git checkout RELEASE_NAME_HERE
cd ..
# Then add + commit your changes
# and then just run
git submodule update --recursive

To run the example app

Run the following script

./init.py .

Development, Setup and, Tools

Note these instructions only for who are working on the development of the SDK not the end-users that will use this SDK in the apps.

  • Cargo Plugins
cargo install cargo-make
  • Install LLVM (10+) in the following way:

  • ubuntu/linux

    1. Install libclangdev - sudo apt-get install libclang-dev.
  • Windows

    1. Install Visual Studio with C++ development support.
    2. Install LLVM or winget install -e --id LLVM.LLVM.
  • MacOS

    1. Install Xcode.
    2. Install LLVM - brew install llvm.

Build and Test

In the Root of the project simply run:

cargo make native

To Run tests:

flutter test

Then run the example flutter app:

  • Build the native libs
cargo make android-dev # or ios
  • then run the app (the example)
flutter run

See also

About

Subsocial Flutter SDK built using Rust and Dart.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 51.5%
  • Rust 47.0%
  • Python 0.4%
  • C 0.3%
  • Ruby 0.3%
  • Kotlin 0.2%
  • Other 0.3%