Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build]
target-dir = "rust/target"
target-dir = "target"

# Android 15+ requires app-native shared libraries to be compatible with 16 KB pages.
# Keep the linker flag in repo config so local builds, Gradle sync scripts, and CI all align.
Expand Down
52 changes: 26 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
shared-key: rust-${{ runner.os }}-${{ env.RUST_TOOLCHAIN }}
workspaces: |
. -> rust/target
. -> target

- name: Check formatting
run: cargo fmt --all --check
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
with:
shared-key: rust-${{ runner.os }}-${{ env.RUST_TOOLCHAIN }}
workspaces: |
. -> rust/target
. -> target

- name: Run workspace tests
shell: bash
Expand All @@ -109,17 +109,17 @@ jobs:
with:
shared-key: rust-${{ runner.os }}-${{ env.RUST_TOOLCHAIN }}
workspaces: |
. -> rust/target
. -> target

- name: Build UniFFI bindings and simulator static library
shell: bash
run: native/ios-app/scripts/sync_uniffi_bindings.sh
run: apps/ios-app/scripts/sync_uniffi_bindings.sh

- name: Upload generated UniFFI artifacts
uses: actions/upload-artifact@v4
with:
name: ios-uniffi-generated
path: native/ios-app/Generated/
path: apps/ios-app/Generated/
retention-days: 1

# ──────────────────────────────────────────────
Expand All @@ -143,7 +143,7 @@ jobs:
with:
shared-key: rust-${{ runner.os }}-${{ env.RUST_TOOLCHAIN }}
workspaces: |
. -> rust/target
. -> target

- name: Build fire-uniffi for iOS
shell: bash
Expand All @@ -157,9 +157,9 @@ jobs:
with:
name: ios-rust-libs
path: |
rust/target/aarch64-apple-ios/release/libfire_uniffi.a
rust/target/aarch64-apple-ios-sim/release/libfire_uniffi.a
rust/target/x86_64-apple-ios/release/libfire_uniffi.a
target/aarch64-apple-ios/release/libfire_uniffi.a
target/aarch64-apple-ios-sim/release/libfire_uniffi.a
target/x86_64-apple-ios/release/libfire_uniffi.a
retention-days: 1

rust-android-cross-build:
Expand All @@ -184,7 +184,7 @@ jobs:
with:
shared-key: rust-${{ runner.os }}-${{ env.RUST_TOOLCHAIN }}
workspaces: |
. -> rust/target
. -> target

- name: Install Android NDK
shell: bash
Expand Down Expand Up @@ -231,8 +231,8 @@ jobs:
with:
name: android-rust-libs
path: |
rust/target/aarch64-linux-android/release/libfire_uniffi.so
rust/target/x86_64-linux-android/release/libfire_uniffi.so
target/aarch64-linux-android/release/libfire_uniffi.so
target/x86_64-linux-android/release/libfire_uniffi.so
retention-days: 1

# ──────────────────────────────────────────────
Expand Down Expand Up @@ -262,13 +262,13 @@ jobs:
uses: actions/download-artifact@v4
with:
name: ios-uniffi-generated
path: native/ios-app/Generated/
path: apps/ios-app/Generated/

- name: Generate Xcode project
run: xcodegen generate --spec native/ios-app/project.yml
run: xcodegen generate --spec apps/ios-app/project.yml

- name: Verify generated Xcode project is up to date
run: git diff --exit-code -- native/ios-app/Fire.xcodeproj
run: git diff --exit-code -- apps/ios-app/Fire.xcodeproj

- name: Run iOS tests
shell: bash
Expand All @@ -293,7 +293,7 @@ jobs:
shift 2

xcodebuild \
-project native/ios-app/Fire.xcodeproj \
-project apps/ios-app/Fire.xcodeproj \
-scheme "$scheme" \
-destination "id=$sim_id" \
-derivedDataPath /tmp/fire-ios-tests \
Expand Down Expand Up @@ -352,10 +352,10 @@ jobs:
with:
shared-key: rust-${{ runner.os }}-${{ env.RUST_TOOLCHAIN }}
workspaces: |
. -> rust/target
. -> target

- name: Run Android debug unit tests and debug build
working-directory: native/android-app
working-directory: apps/android-app
env:
ANDROID_HOME: ${{ env.ANDROID_SDK_ROOT }}
ANDROID_SDK_ROOT: ${{ env.ANDROID_SDK_ROOT }}
Expand Down Expand Up @@ -406,7 +406,7 @@ jobs:
with:
shared-key: rust-${{ runner.os }}-${{ env.RUST_TOOLCHAIN }}
workspaces: |
. -> rust/target
. -> target

- name: Install XcodeGen
shell: bash
Expand All @@ -424,23 +424,23 @@ jobs:
uses: actions/download-artifact@v4
with:
name: ios-uniffi-generated
path: native/ios-app/Generated/
path: apps/ios-app/Generated/

- name: Generate Xcode project
run: xcodegen generate --spec native/ios-app/project.yml
run: xcodegen generate --spec apps/ios-app/project.yml

- name: Download pre-built iOS Rust libraries
uses: actions/download-artifact@v4
with:
name: ios-rust-libs
path: rust/target
path: target

- name: Build iOS app for device
env:
FIRE_SKIP_RUST_CROSS_BUILD: "1"
run: |
xcodebuild \
-project native/ios-app/Fire.xcodeproj \
-project apps/ios-app/Fire.xcodeproj \
-scheme Fire \
-configuration Release \
-destination 'generic/platform=iOS' \
Expand Down Expand Up @@ -498,13 +498,13 @@ jobs:
with:
shared-key: rust-${{ runner.os }}-${{ env.RUST_TOOLCHAIN }}
workspaces: |
. -> rust/target
. -> target

- name: Download pre-built Android Rust libraries
uses: actions/download-artifact@v4
with:
name: android-rust-libs
path: rust/target
path: target

- name: Prepare Android release keystore
env:
Expand All @@ -515,7 +515,7 @@ jobs:
run: ./scripts/android/prepare_release_keystore.sh

- name: Run Android release build
working-directory: native/android-app
working-directory: apps/android-app
env:
ANDROID_HOME: ${{ env.ANDROID_SDK_ROOT }}
ANDROID_SDK_ROOT: ${{ env.ANDROID_SDK_ROOT }}
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
with:
shared-key: rust-${{ runner.os }}-${{ env.RUST_TOOLCHAIN }}
workspaces: |
. -> rust/target
. -> target

- name: Install XcodeGen
shell: bash
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
with:
shared-key: rust-${{ runner.os }}-${{ env.RUST_TOOLCHAIN }}
workspaces: |
. -> rust/target
. -> target

- name: Prepare Android release keystore
env:
Expand All @@ -226,7 +226,7 @@ jobs:
run: ./scripts/android/prepare_release_keystore.sh

- name: Assemble signed Android release APK and bundle
working-directory: native/android-app
working-directory: apps/android-app
env:
ANDROID_HOME: ${{ env.ANDROID_SDK_ROOT }}
ANDROID_SDK_ROOT: ${{ env.ANDROID_SDK_ROOT }}
Expand All @@ -249,27 +249,27 @@ jobs:
set -euo pipefail
stage="${GITHUB_WORKSPACE}/dist/android"
mkdir -p "$stage"
mapfile -t apks < <(find native/android-app/build/outputs/apk -type f -name '*.apk' | sort)
mapfile -t apks < <(find apps/android-app/build/outputs/apk -type f -name '*.apk' | sort)
if [[ ${#apks[@]} -eq 0 ]]; then
echo "No APK produced under native/android-app/build/outputs/apk" >&2
find native/android-app/build/outputs -type f | head -100 >&2 || true
echo "No APK produced under apps/android-app/build/outputs/apk" >&2
find apps/android-app/build/outputs -type f | head -100 >&2 || true
exit 1
fi
for apk in "${apks[@]}"; do
base="$(basename "$apk")"
cp "$apk" "$stage/Fire-${{ needs.resolve.outputs.tag }}-${base}"
done
# Convenience alias for the primary release APK when present.
release_apk="$(find native/android-app/build/outputs/apk/release -type f -name '*.apk' | head -n 1 || true)"
release_apk="$(find apps/android-app/build/outputs/apk/release -type f -name '*.apk' | head -n 1 || true)"
if [[ -n "$release_apk" ]]; then
cp "$release_apk" "$stage/Fire-${{ needs.resolve.outputs.tag }}-release.apk"
fi
release_aab="$(find native/android-app/build/outputs/bundle/release -type f -name '*.aab' | head -n 1 || true)"
release_aab="$(find apps/android-app/build/outputs/bundle/release -type f -name '*.aab' | head -n 1 || true)"
if [[ -n "$release_aab" ]]; then
cp "$release_aab" "$stage/Fire-${{ needs.resolve.outputs.tag }}-release.aab"
else
echo "No signed AAB produced under native/android-app/build/outputs/bundle/release" >&2
find native/android-app/build/outputs -type f | head -100 >&2 || true
echo "No signed AAB produced under apps/android-app/build/outputs/bundle/release" >&2
find apps/android-app/build/outputs -type f | head -100 >&2 || true
exit 1
fi
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
shared-key: rust-${{ runner.os }}-${{ env.RUST_TOOLCHAIN }}
workspaces: |
. -> rust/target
. -> target

- name: Install XcodeGen
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios-testflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
with:
shared-key: rust-${{ runner.os }}-${{ env.RUST_TOOLCHAIN }}
workspaces: |
. -> rust/target
. -> target

- name: Install XcodeGen
shell: bash
Expand Down
13 changes: 6 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@
.swiftpm/
.codex/
/target/
/rust/target/
/uniffi/
/artifacts/
/third_party/openwire/
**/*.xcodeproj/xcuserdata/
**/*.xcworkspace/xcuserdata/
**/DerivedData/
native/ios-app/Configs/Fire-Local-Debug.xcconfig
native/ios-app/Configs/Fire-Local-Release.xcconfig
native/android-app/key.properties
native/android-app/*.jks
native/android-app/*.keystore
native/android-app/*.p12
apps/ios-app/Configs/Fire-Local-Debug.xcconfig
apps/ios-app/Configs/Fire-Local-Release.xcconfig
apps/android-app/key.properties
apps/android-app/*.jks
apps/android-app/*.keystore
apps/android-app/*.p12
fire-support-*.json
13 changes: 6 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AGENTS.md
This repository is the Fire native rebuild for the LinuxDo community.
The project uses Rust as the shared core and targets both iOS and Android native apps through the `native/` hosts plus the `rust/` workspace and UniFFI boundary.
The project uses Rust as the shared core and targets both iOS and Android native apps through the `apps/` hosts plus the `crates/` workspace and UniFFI boundary.
Preserve clear boundaries between native platform code, shared Rust logic, backend protocol documentation, and third-party infrastructure repositories.
Treat code as the source of truth and keep documentation aligned with actual behavior.

Expand All @@ -12,16 +12,15 @@ fire/
architecture/
fire-native-workspace.md
feedback-and-crash-reporting.md
native/
apps/
ios-app/
android-app/
references/
fluxdo/
rust/
crates/
fire-models/
fire-core/
fire-uniffi/
crates/
fire-models/
fire-core/
fire-uniffi/
services/
feedback-ingress/
third_party/
Expand Down
30 changes: 15 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[workspace]
members = [
"rust/crates/fire-models",
"rust/crates/fire-rich-text",
"rust/crates/fire-store",
"rust/crates/fire-core",
"rust/crates/fire-uniffi",
"rust/crates/fire-uniffi-chat",
"rust/crates/fire-uniffi-diagnostics",
"rust/crates/fire-uniffi-ldc",
"rust/crates/fire-uniffi-messagebus",
"rust/crates/fire-uniffi-notifications",
"rust/crates/fire-uniffi-search",
"rust/crates/fire-uniffi-session",
"rust/crates/fire-uniffi-topics",
"rust/crates/fire-uniffi-types",
"rust/crates/fire-uniffi-user",
"crates/fire-models",
"crates/fire-rich-text",
"crates/fire-store",
"crates/fire-core",
"crates/fire-uniffi",
"crates/fire-uniffi-chat",
"crates/fire-uniffi-diagnostics",
"crates/fire-uniffi-ldc",
"crates/fire-uniffi-messagebus",
"crates/fire-uniffi-notifications",
"crates/fire-uniffi-search",
"crates/fire-uniffi-session",
"crates/fire-uniffi-topics",
"crates/fire-uniffi-types",
"crates/fire-uniffi-user",
]
resolver = "2"

Expand Down
Loading
Loading