mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-05 02:29:55 +02:00
refactor(platform): remove Apple targets from KMP
This commit is contained in:
21
AGENTS.md
21
AGENTS.md
@@ -13,13 +13,14 @@ Nested guides take precedence when editing under those trees:
|
||||
|
||||
## Project overview
|
||||
|
||||
VniDrop is a cross-platform **local P2P file transfer** app (Android, iOS, Desktop).
|
||||
VniDrop is a cross-platform **local P2P file transfer** app.
|
||||
|
||||
| Layer | Path | Responsibility |
|
||||
|-------|------|----------------|
|
||||
| Rust core | `crates/vnidrop/` | Iroh endpoint, blobs, SQLite, tickets, approval, streaming |
|
||||
| Shared KMP | `shared/` | Compose UI, ViewModels, expect/actual platform bridges |
|
||||
| Hosts | `androidApp/`, `iosApp/`, `desktopApp/` | Thin app shells |
|
||||
| Shared KMP | `shared/` | Compose UI and platform bridges for Android, Windows, and Linux |
|
||||
| Compose hosts | `androidApp/`, `desktopApp/` | Thin Android and Windows/Linux app shells |
|
||||
| Apple app | `apple/` | Native SwiftUI UI using generated Rust/UniFFI Swift bindings |
|
||||
|
||||
**Invariant:** UI/platform opens files and handles pickers; **Rust streams bytes**.
|
||||
Do not design features that move transfer payloads through Kotlin heap by default.
|
||||
@@ -53,7 +54,7 @@ Domain docs (reference, do not paste into PRs):
|
||||
## Build and test
|
||||
|
||||
Install prerequisites when missing: Rust stable + rustfmt + clippy, JDK 17,
|
||||
Android NDK/SDK only if building Android, Xcode only for iOS.
|
||||
Android NDK/SDK only if building Android, Xcode only for the native Apple app.
|
||||
|
||||
### Rust core (`crates/vnidrop` or workspace root)
|
||||
|
||||
@@ -95,15 +96,13 @@ Other targets (slower / machine-dependent):
|
||||
|
||||
```bash
|
||||
./gradlew :shared:testAndroidHostTest
|
||||
./gradlew :shared:iosSimulatorArm64Test # macOS + Xcode
|
||||
./gradlew :androidApp:assembleDebug
|
||||
./gradlew :desktopApp:run
|
||||
```
|
||||
|
||||
**Note:** `jvmTest` CI currently runs on **macOS**. Gobley host cargo is enabled
|
||||
for the current host and architecture, so local Linux and Windows builds embed
|
||||
their matching desktop Rust library. Prefer macOS only when exact CI parity is
|
||||
required.
|
||||
**Note:** `jvmTest` CI runs on **Linux**. Gobley host cargo is enabled for the
|
||||
current host and architecture, so local desktop builds embed their matching
|
||||
Rust library.
|
||||
|
||||
### What to run before finishing
|
||||
|
||||
@@ -144,12 +143,12 @@ shared/src/commonMain/kotlin/com/vnidrop/app/
|
||||
core/ # CoreGateway, models, pickers interfaces
|
||||
feature/send|receive|approvals|settings|app/
|
||||
ui/theme|components|navigation|feedback|state/
|
||||
androidMain|iosMain|jvmMain/ # expect/actual implementations
|
||||
androidMain|jvmMain/ # expect/actual implementations
|
||||
```
|
||||
|
||||
### Platform file rules (do not violate)
|
||||
|
||||
- Desktop / path-based iOS: paths; directory walk in Rust when `is_directory`.
|
||||
- Windows/Linux desktop: paths; directory walk in Rust when `is_directory`.
|
||||
- Android **share**: ParcelFileDescriptor **file** FDs only — never a directory FD.
|
||||
Folder share expands SAF trees in Kotlin to per-file FDs + relative names.
|
||||
- Android **receive** default: MediaStore Downloads sink; custom trees via SAF write.
|
||||
|
||||
Reference in New Issue
Block a user