Pular para o conteúdo

Setup

Este conteúdo não está disponível em sua língua ainda.

Install these tools before working on NAHPU:

  1. Install Flutter using the official guide for your operating system.

    Run flutter doctor and resolve the reported issues before continuing.

    Janela do terminal
    flutter doctor
  2. Install Rust.

    Janela do terminal
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    rustc --version
  3. Install Flutter Rust Bridge codegen.

    Janela do terminal
    cargo install flutter_rust_bridge_codegen
  4. Make sure Cargo binaries are on your PATH.

    Janela do terminal
    export PATH="$HOME/.cargo/bin:$PATH"

    Add that line to your shell config, such as ~/.zshrc or ~/.bashrc.

  5. Clone NAHPU and get dependencies.

    Janela do terminal
    git clone https://github.com/nahpu/nahpu.git
    cd nahpu
    flutter pub get
  6. Run the app.

    Janela do terminal
    flutter run
Janela do terminal
# Analyze Dart code
flutter analyze
# Run Dart tests
flutter test
# Generate Drift, Riverpod, and other Dart generated code
dart run build_runner build --delete-conflicting-outputs
# Generate Flutter Rust Bridge bindings
flutter_rust_bridge_codegen generate
# Run cargo check in rust/
python scripts.py frb --check
# Cleaning up build artifacts. Do this regularly to save disk space.
flutter clean
# For cleaning up Rust build artifacts, run this in the rust/ directory.
cd rust/
cargo clean