> ## Documentation Index
> Fetch the complete documentation index at: https://ecosys.devs.surf/llms.txt
> Use this file to discover all available pages before exploring further.

# Aus dem Quellcode bauen und testen

> Baue den gemeinsamen Rust-Core und die nativen Ecosys-Clients. Diese Anleitung dokumentiert die nachgewiesenen Build-Befehle und CI-Prüfungen.

Ecosys ist ein Multi-Plattform-Projekt mit einem gemeinsamen Rust-Core und nativen Anwendungen. Die folgenden Befehle stammen aus den README-Dateien und CI-Workflows des Repositories. Sie sind für Entwickler gedacht, die den Stand selbst bauen oder überprüfen möchten.

## Repository klonen

```bash theme={null}
git clone https://github.com/Tomologaming/ecosys.git
cd ecosys
```

## Rust-Core testen

Installiere Rust stable und führe aus:

```bash theme={null}
cargo test --manifest-path core/Cargo.toml
```

Der Core verwendet Rust 2021 und deklariert Rust 1.75 als Mindestversion im Manifest. Der genaue Toolchain- und Target-Bedarf kann je nach Plattformbuild abweichen.

## Android bauen

Der dokumentierte CI-Build nutzt JDK 17, Android SDK 35, NDK 27.2.12479018 und Rust stable.

```bash theme={null}
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android
cargo install cargo-ndk --locked
```

Setze anschließend ANDROID\_NDK\_HOME auf das installierte NDK und baue die nativen Bibliotheken:

```bash theme={null}
export ANDROID_NDK_HOME="$ANDROID_HOME/ndk/27.2.12479018"

cd core
cargo ndk -t arm64-v8a -t armeabi-v7a -t x86_64 \
  -o ../android/app/src/main/jniLibs \
  build --release
cd ..
```

Baue die Android-App und starte die JVM-Tests:

```bash theme={null}
cd android
gradle assembleDebug
gradle testDebugUnitTest
```

Der [Android GitHub Actions Workflow](https://github.com/Tomologaming/ecosys/actions/workflows/build-android.yml) führt zusätzlich Rust-Core-Tests und eine Prüfung durch, ob die nativen Bibliotheken für alle drei ABIs im App-Paket liegen.

## Windows bauen

Der Windows-Workflow und die README dokumentieren .NET 8 sowie einen nativen Rust-Build für x86\_64-pc-windows-msvc.

```powershell theme={null}
cargo build --manifest-path core/Cargo.toml --release --target x86_64-pc-windows-msvc
dotnet build windows/Ecosys.Windows/Ecosys.Windows.csproj -c Release
dotnet run --project windows/Ecosys.SelfTest/Ecosys.SelfTest.csproj -c Release
dotnet publish windows/Ecosys.Windows/Ecosys.Windows.csproj -c Release -r win-x64 --self-contained true -o dist/publish
```

Der Installer wird mit Inno Setup 7 gebaut. Die genauen Build-Parameter stehen in der [Windows README](https://github.com/Tomologaming/ecosys/blob/main/README.md) und in [docs/windows-installer.md](https://github.com/Tomologaming/ecosys/blob/main/docs/windows-installer.md).

## iOS bauen

Der iOS-Workflow läuft auf macOS. Lokal benötigst du Xcode 15 oder neuer und die Rust-Targets für iOS-Geräte und Simulatoren.

```bash theme={null}
rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios
```

Die dokumentierten Swift-Tests lassen sich so starten:

```bash theme={null}
xcodebuild test -project ios/Ecosys.xcodeproj -scheme EcosysTests \
  -destination 'platform=iOS Simulator,name=iPhone 16'
```

Der [iOS Build Workflow](https://github.com/Tomologaming/ecosys/actions/workflows/build-ios.yml) baut zusätzlich die Device- und Simulator-Static-Libraries und packt ein unsigniertes IPA für Sideloadly.

## Fuzzing

Die Rust-Core-Fuzzer liegen unter core/fuzz. Benötigt werden nightly Rust, LLVM Tools und cargo-fuzz.

```bash theme={null}
cargo install cargo-fuzz --locked
cd core/fuzz
cargo fuzz run message_parse
cargo fuzz run frame_decode
cargo fuzz run receipt_ledger
```

Die CI führt kurze Fuzzing-Kampagnen bei passenden Pull Requests und Pushes aus. Wöchentliche und manuelle Läufe führen längere zehnminütige Kampagnen pro Target aus.

Details: [Fuzzing-Dokumentation](https://github.com/Tomologaming/ecosys/blob/main/docs/fuzzing.md).

## Build ist nicht gleich Sicherheitsfreigabe

Ein erfolgreicher Build zeigt, dass die in der Pipeline enthaltenen Kompilierungs- und Testschritte erfolgreich waren. Er ersetzt weder die Prüfung auf physischen Geräten noch ein unabhängiges kryptografisches Audit.

## CI-Workflows

* [Android](https://github.com/Tomologaming/ecosys/actions/workflows/build-android.yml)
* [Windows](https://github.com/Tomologaming/ecosys/actions/workflows/build-windows.yml)
* [iOS](https://github.com/Tomologaming/ecosys/actions/workflows/build-ios.yml)
* [Core Fuzzing](https://github.com/Tomologaming/ecosys/actions/workflows/fuzz-core.yml)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.