mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-05-18 13:28:12 -04:00
Update iOS RustCore embed folder structure (#1404)
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@@ -443,12 +443,5 @@ core/rust/target/
|
||||
# Browser extension WASM (built by: cd core/rust && ./build.sh --browser)
|
||||
apps/browser-extension/src/utils/dist/core/rust
|
||||
|
||||
# iOS Swift bindings (built by: cd core/rust && ./build.sh --ios)
|
||||
apps/mobile-app/ios/VaultStoreKit/RustCore/
|
||||
|
||||
# Android Kotlin bindings (built by: cd core/rust && ./build.sh --android)
|
||||
apps/mobile-app/android/app/src/main/java/net/aliasvault/app/rustcore/uniffi/
|
||||
apps/mobile-app/android/app/src/main/jniLibs/
|
||||
|
||||
# Server .NET bindings (built by: cd core/rust && ./build.sh --server)
|
||||
apps/server/Utilities/AliasVault.RustCore/
|
||||
|
||||
4
apps/mobile-app/android/.gitignore
vendored
4
apps/mobile-app/android/.gitignore
vendored
@@ -14,3 +14,7 @@ local.properties
|
||||
|
||||
# Bundle artifacts
|
||||
*.jsbundle
|
||||
|
||||
# Android Kotlin bindings (built by: cd core/rust && ./build.sh --android)
|
||||
app/src/main/java/net/aliasvault/app/rustcore/uniffi/
|
||||
app/src/main/jniLibs/
|
||||
15
apps/mobile-app/ios/.gitignore
vendored
15
apps/mobile-app/ios/.gitignore
vendored
@@ -31,12 +31,11 @@ project.xcworkspace
|
||||
|
||||
# Generated Rust Core (built from /core/rust via Scripts/build-rust-core.sh)
|
||||
/Frameworks/
|
||||
/VaultStoreKit/RustCore/Generated/
|
||||
/VaultStoreKit/RustCore/lib/
|
||||
/VaultStoreKit/RustCore/include/
|
||||
/VaultStoreKit/RustCore/.rust-core-checksum
|
||||
|
||||
/VaultUI/RustCore/Generated/
|
||||
/VaultUI/RustCore/lib/
|
||||
/VaultUI/RustCore/include/
|
||||
/VaultUI/RustCore/.rust-core-checksum
|
||||
/RustCoreFramework/RustCore/Generated/
|
||||
/RustCoreFramework/RustCore/lib/
|
||||
/RustCoreFramework/RustCore/include/
|
||||
/RustCoreFramework/RustCore/.rust-core-checksum
|
||||
/RustCoreFramework/aliasvault_coreFFI.h
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
22
apps/mobile-app/ios/RustCoreFramework/Info.plist
Normal file
22
apps/mobile-app/ios/RustCoreFramework/Info.plist
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
</dict>
|
||||
</plist>
|
||||
16
apps/mobile-app/ios/RustCoreFramework/RustCore.swift
Normal file
16
apps/mobile-app/ios/RustCoreFramework/RustCore.swift
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// RustCore.swift
|
||||
// RustCoreFramework
|
||||
//
|
||||
// Re-exports UniFFI generated Rust bindings for use by VaultStoreKit and VaultUI
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
// This file serves as a placeholder to ensure the RustCoreFramework module is created.
|
||||
// All Rust Core functionality is provided by the UniFFI-generated Swift bindings
|
||||
// in RustCore/Generated/aliasvault_core.swift, which are automatically exported
|
||||
// as part of this framework.
|
||||
|
||||
// The filterCredentialsJson function and any other Rust functions are available
|
||||
// directly when importing RustCoreFramework, no additional re-export needed.
|
||||
17
apps/mobile-app/ios/RustCoreFramework/RustCoreFramework.h
Normal file
17
apps/mobile-app/ios/RustCoreFramework/RustCoreFramework.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// RustCoreFramework.h
|
||||
// RustCoreFramework
|
||||
//
|
||||
// Umbrella header for RustCoreFramework
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for RustCoreFramework.
|
||||
FOUNDATION_EXPORT double RustCoreFrameworkVersionNumber;
|
||||
|
||||
//! Project version string for RustCoreFramework.
|
||||
FOUNDATION_EXPORT const unsigned char RustCoreFrameworkVersionString[];
|
||||
|
||||
// Import the UniFFI generated C header
|
||||
#import "aliasvault_coreFFI.h"
|
||||
5
apps/mobile-app/ios/RustCoreFramework/module.modulemap
Normal file
5
apps/mobile-app/ios/RustCoreFramework/module.modulemap
Normal file
@@ -0,0 +1,5 @@
|
||||
framework module RustCoreFramework {
|
||||
umbrella header "RustCoreFramework.h"
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import Foundation
|
||||
import SQLite3
|
||||
import CryptoKit
|
||||
import RustCoreFramework
|
||||
|
||||
/// Service for vault merge operations using the Rust core library.
|
||||
/// Wraps UniFFI-generated bindings for LWW merge operations on SQLite vault databases.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import Foundation
|
||||
import VaultModels
|
||||
import RustCoreFramework
|
||||
|
||||
/// Wrapper for the Rust credential matcher using UniFFI bindings.
|
||||
public class RustCredentialMatcher {
|
||||
|
||||
@@ -24,7 +24,7 @@ ANDROID_DIR="$DIST_DIR/android"
|
||||
# Target directories in consumer apps
|
||||
BROWSER_EXT_DIST="$SCRIPT_DIR/../../apps/browser-extension/src/utils/dist/core/rust"
|
||||
BLAZOR_CLIENT_DIST="$SCRIPT_DIR/../../apps/server/AliasVault.Client/wwwroot/wasm"
|
||||
IOS_APP_DIST="$SCRIPT_DIR/../../apps/mobile-app/ios/VaultStoreKit/RustCore"
|
||||
IOS_APP_DIST="$SCRIPT_DIR/../../apps/mobile-app/ios/RustCoreFramework/RustCore"
|
||||
ANDROID_APP_DIST="$SCRIPT_DIR/../../apps/mobile-app/android/app/src/main/jniLibs"
|
||||
|
||||
echo -e "${BLUE}========================================${NC}"
|
||||
@@ -435,13 +435,15 @@ distribute_ios() {
|
||||
|
||||
# Copy headers and modulemap
|
||||
if [ -d "$IOS_DIR/swift" ] && [ -n "$(ls -A "$IOS_DIR/swift" 2>/dev/null)" ]; then
|
||||
cp "$IOS_DIR/swift"/*.h "$IOS_APP_DIST/include/" 2>/dev/null || true
|
||||
# Copy C header to framework root (for public headers)
|
||||
cp "$IOS_DIR/swift"/aliasvault_coreFFI.h "$IOS_APP_DIST/../" 2>/dev/null || true
|
||||
|
||||
# Create module.modulemap for the C header
|
||||
cat > "$IOS_APP_DIST/include/module.modulemap" << 'EOF'
|
||||
module aliasvault_coreFFI {
|
||||
header "aliasvault_coreFFI.h"
|
||||
# Create the framework modulemap at framework root
|
||||
cat > "$IOS_APP_DIST/../module.modulemap" << 'EOF'
|
||||
framework module RustCoreFramework {
|
||||
umbrella header "RustCoreFramework.h"
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
EOF
|
||||
echo -e " Copied headers and modulemap"
|
||||
@@ -468,7 +470,6 @@ Auto-generated from `/core/rust`. Do not edit manually.
|
||||
|
||||
- `lib/device/libaliasvault_core.a` - Static library for iOS devices (arm64)
|
||||
- `lib/simulator/libaliasvault_core.a` - Static library for iOS simulator (arm64 Apple Silicon)
|
||||
- `include/` - C headers and modulemap for UniFFI bindings
|
||||
- `Generated/` - Swift bindings generated by UniFFI
|
||||
|
||||
## Regenerate
|
||||
|
||||
Reference in New Issue
Block a user