### Clone and Install Dependencies Source: https://github.com/viscouspot/gitsync/blob/main/README.md Clone the GitSync repository and install Flutter dependencies using FVM. ```bash git clone https://github.com/ViscousPot/GitSync.git cd GitSync fvm flutter pub get ``` -------------------------------- ### GPL Interactive Program Start-up Notice Source: https://github.com/viscouspot/gitsync/blob/main/LICENSE.md Display this notice when a program starts in interactive mode to inform users about its free software status and warranty limitations. ```text Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details. ``` -------------------------------- ### GitHub Action to Precompile and Upload Binaries Source: https://github.com/viscouspot/gitsync/blob/main/rust_builder/cargokit/docs/precompiled_binaries.md This GitHub Actions workflow runs on pushes to the main branch. It sets up Dart, installs GTK on Ubuntu, and precompiles binaries for various platforms using provided secrets for the GitHub token and private key. ```yaml on: push: branches: [ main ] name: Precompile Binaries jobs: Precompile: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: - ubuntu-latest - macOS-latest - windows-latest steps: - uses: actions/checkout@v2 - uses: dart-lang/setup-dart@v1 - name: Install GTK if: (matrix.os == 'ubuntu-latest') run: sudo apt-get update && sudo apt-get install libgtk-3-dev - name: Precompile if: (matrix.os == 'macOS-latest') || (matrix.os == 'windows-latest') run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=superlistapp/super_native_extensions working-directory: super_native_extensions/cargokit/build_tool env: GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} PRIVATE_KEY: ${{ secrets.RELEASE_PRIVATE_KEY }} - name: Precompile (with Android) if: (matrix.os == 'ubuntu-latest') run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=superlistapp/super_native_extensions --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=24.0.8215888 --android-min-sdk-version=23 working-directory: super_native_extensions/cargokit/build_tool env: GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} PRIVATE_KEY: ${{ secrets.RELEASE_PRIVATE_KEY }} ``` -------------------------------- ### Generate Rust-Dart Bindings Source: https://github.com/viscouspot/gitsync/blob/main/README.md Install the `flutter_rust_bridge_codegen` tool and generate the necessary bindings between Rust and Dart. This step is required when the Rust API changes. ```bash cargo install flutter_rust_bridge_codegen --version 2.12.0 flutter_rust_bridge_codegen generate ``` -------------------------------- ### Standard GPL Copyright Notice for Source Files Source: https://github.com/viscouspot/gitsync/blob/main/LICENSE.md Include this notice at the beginning of each source file to state the copyright and licensing terms. It ensures the program remains free software. ```text Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . ``` -------------------------------- ### Generate Key Pair for Signing Source: https://github.com/viscouspot/gitsync/blob/main/rust_builder/cargokit/docs/precompiled_binaries.md Use the `build_tool` to generate a public and private key pair for signing precompiled binaries. Store the private key securely as it's needed for GitHub Actions secrets. ```bash dart run build_tool gen-key ``` -------------------------------- ### Configure `cargokit.yaml` for Precompiled Binaries Source: https://github.com/viscouspot/gitsync/blob/main/rust_builder/cargokit/docs/precompiled_binaries.md Place this file alongside `Cargo.toml` in your Rust crate. It specifies the URL prefix for downloading precompiled binaries and the public key for verification. ```yaml precompiled_binaries: # Uri prefix used when downloading precompiled binaries. url_prefix: https://github.com///releases/download/precompiled_ # Public key for verifying downloaded precompiled binaries. public_key: ``` -------------------------------- ### Run the GitSync Application Source: https://github.com/viscouspot/gitsync/blob/main/README.md Execute the Flutter application using the FVM-managed Flutter SDK. ```bash fvm flutter run ``` -------------------------------- ### Cargokit Rust Crate Configuration Source: https://github.com/viscouspot/gitsync/blob/main/rust_builder/cargokit/docs/architecture.md Configure Rust package builds using `cargokit.yaml`. Specify toolchains and extra flags for debug and release builds. This file should be placed next to `Cargo.toml`. ```yaml cargo: debug: # Configuration of cargo execution during debug builds toolchain: stable # default release: # Configuration of cargo execution for release builds toolchain: nightly # rustup will be invoked with nightly toolchain extra_flags: # extra arguments passed to cargo build - -Z - build-std=panic_abort,std # If crate ships with precompiled binaries, they can be configured here. precompiled_binaries: # Uri prefix used when downloading precompiled binaries. url_prefix: https://github.com/superlistapp/super_native_extensions/releases/download/precompiled_ # Public key for verifying downloaded precompiled binaries. public_key: 3a257ef1c7d72d84225ac4658d24812ada50a7a7a8a2138c2a91353389fdc514 ``` -------------------------------- ### Cargokit Application Options Configuration Source: https://github.com/viscouspot/gitsync/blob/main/rust_builder/cargokit/docs/architecture.md Configure application-level options for Cargokit using `cargokit_options.yaml`. Control verbose logging and the use of precompiled binaries. This file should be placed at the root of the application package. ```yaml # Enables verbose logging of Cargokit during build verbose_logging: true # Opts out of using precompiled binaries. If crate has configured # and deployed precompiled binaries, these will be by default used whenever Rustup # is not installed. With `use_precompiled_binaries` set to false, the build will # instead be aborted prompting user to install Rustup. use_precompiled_binaries: false ``` -------------------------------- ### Copy OAuth Secrets Template Source: https://github.com/viscouspot/gitsync/blob/main/README.md Copy the template for OAuth secrets. Ensure the `oauthRedirectUrl` is set correctly for OAuth sign-in flows to function. ```bash cp lib/constant/secrets.dart.template lib/constant/secrets.dart ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.