build: add macOS-specific configuration and cross-compilation support

- Add Info.plist for macOS app metadata
  - Configure bundle identifier as claudia.asterisk.so
  - Set minimum macOS version to 10.15
  - Register .claudia.json file type association
  - Add usage descriptions for camera and microphone access

- Add entitlements.plist for macOS app permissions
  - Disable app sandbox for Homebrew compatibility
  - Enable network access for API communications
  - Allow file system access and subprocess spawning
  - Configure hardened runtime exceptions for JIT and library validation
  - Enable automation for Apple Events

- Add .cargo/config.toml for cross-compilation
  - Configure aarch64-unknown-linux-gnu target
  - Enable PKG_CONFIG_ALLOW_CROSS for cross-platform builds
This commit is contained in:
Vivek R
2025-08-01 17:12:06 +05:30
parent 68d557d50a
commit 7b700331cb
3 changed files with 97 additions and 0 deletions

5
.cargo/config.toml Normal file
View File

@@ -0,0 +1,5 @@
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
[env]
PKG_CONFIG_ALLOW_CROSS = "1"

43
src-tauri/Info.plist Normal file
View File

@@ -0,0 +1,43 @@
<?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>NSRequiresAquaSystemAppearance</key>
<false/>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
<key>CFBundleName</key>
<string>Claudia</string>
<key>CFBundleDisplayName</key>
<string>Claudia</string>
<key>CFBundleIdentifier</key>
<string>claudia.asterisk.so</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Claudia Agent</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>claudia.json</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>icon.icns</string>
<key>LSHandlerRank</key>
<string>Owner</string>
</dict>
</array>
<key>NSAppleEventsUsageDescription</key>
<string>Claudia needs to send Apple Events to other applications.</string>
<key>NSAppleScriptEnabled</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Claudia needs camera access for capturing images for AI processing.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Claudia needs microphone access for voice input features.</string>
</dict>
</plist>

View File

@@ -0,0 +1,49 @@
<?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>
<!-- Allow app to be run from Homebrew installation -->
<key>com.apple.security.app-sandbox</key>
<false/>
<!-- Network access for Claude API and other services -->
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
<!-- File system access -->
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.files.downloads.read-write</key>
<true/>
<!-- Allow spawning subprocesses (needed for shell commands) -->
<key>com.apple.security.inherit</key>
<true/>
<!-- Allow automation for Apple Events -->
<key>com.apple.security.automation.apple-events</key>
<true/>
<!-- Camera and microphone if needed -->
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.device.microphone</key>
<true/>
<!-- Printing -->
<key>com.apple.security.print</key>
<true/>
<!-- Required for Hardened Runtime -->
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
</dict>
</plist>