Initialize Tauri application with React and TypeScript setup, including essential configuration files, project structure, and initial assets. Added .gitignore, package.json, and README.md for project documentation and setup instructions.
@@ -0,0 +1,85 @@
|
||||
# Build Agent
|
||||
|
||||
## Purpose
|
||||
|
||||
Handles building and bundling the Tauri application for all target platforms.
|
||||
|
||||
## Capabilities
|
||||
|
||||
- Build desktop applications (Windows, macOS, Linux)
|
||||
- Build mobile applications (Android, iOS)
|
||||
- Configure build options and optimizations
|
||||
- Handle code signing and notarization
|
||||
|
||||
## Commands
|
||||
|
||||
### Desktop Build
|
||||
|
||||
```bash
|
||||
# Development build
|
||||
npm run tauri dev
|
||||
|
||||
# Production build (all desktop targets)
|
||||
npm run tauri build
|
||||
|
||||
# Specific target
|
||||
npm run tauri build -- --target x86_64-pc-windows-msvc
|
||||
npm run tauri build -- --target universal-apple-darwin
|
||||
npm run tauri build -- --target x86_64-unknown-linux-gnu
|
||||
```
|
||||
|
||||
### Mobile Build
|
||||
|
||||
```bash
|
||||
# Android
|
||||
npm run tauri android build
|
||||
npm run tauri android build -- --debug
|
||||
npm run tauri android build -- --target aarch64
|
||||
|
||||
# iOS
|
||||
npm run tauri ios build
|
||||
npm run tauri ios build -- --debug
|
||||
```
|
||||
|
||||
## Build Configuration
|
||||
|
||||
Located in `tauri.conf.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"icon": ["icons/32x32.png", "icons/icon.icns", "icons/icon.ico"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Optimization Settings
|
||||
|
||||
In `src-tauri/Cargo.toml`:
|
||||
|
||||
```toml
|
||||
[profile.release]
|
||||
panic = "abort"
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
opt-level = "s"
|
||||
strip = true
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
| Variable | Purpose |
|
||||
|----------|---------|
|
||||
| `TAURI_SIGNING_PRIVATE_KEY` | Code signing key |
|
||||
| `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` | Key password |
|
||||
| `APPLE_DEVELOPMENT_TEAM` | iOS/macOS team ID |
|
||||
| `ANDROID_HOME` | Android SDK path |
|
||||
| `NDK_HOME` | Android NDK path |
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
1. **Build fails**: Check Rust and platform SDKs are installed
|
||||
2. **Icon errors**: Ensure all icon sizes exist in `src-tauri/icons/`
|
||||
3. **Signing issues**: Verify certificates and provisioning profiles
|
||||
@@ -0,0 +1,232 @@
|
||||
# Deploy Agent
|
||||
|
||||
## Purpose
|
||||
|
||||
Handles deployment, distribution, and release management for all platforms.
|
||||
|
||||
## Capabilities
|
||||
|
||||
- Create release builds
|
||||
- Code signing and notarization
|
||||
- App store submissions
|
||||
- Auto-update configuration
|
||||
|
||||
## Desktop Distribution
|
||||
|
||||
### Windows
|
||||
|
||||
#### Build Installers
|
||||
|
||||
```bash
|
||||
npm run tauri build -- --target x86_64-pc-windows-msvc
|
||||
```
|
||||
|
||||
Outputs:
|
||||
- `src-tauri/target/release/bundle/msi/*.msi`
|
||||
- `src-tauri/target/release/bundle/nsis/*-setup.exe`
|
||||
|
||||
#### Code Signing
|
||||
|
||||
1. Obtain EV code signing certificate
|
||||
2. Set environment variables:
|
||||
```bash
|
||||
export TAURI_SIGNING_PRIVATE_KEY="path/to/key"
|
||||
export TAURI_SIGNING_PRIVATE_KEY_PASSWORD="password"
|
||||
```
|
||||
|
||||
### macOS
|
||||
|
||||
#### Build Universal Binary
|
||||
|
||||
```bash
|
||||
npm run tauri build -- --target universal-apple-darwin
|
||||
```
|
||||
|
||||
Outputs:
|
||||
- `src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg`
|
||||
- `src-tauri/target/universal-apple-darwin/release/bundle/macos/*.app`
|
||||
|
||||
#### Notarization
|
||||
|
||||
```bash
|
||||
# Using xcrun
|
||||
xcrun notarytool submit ./app.dmg \
|
||||
--apple-id "your@email.com" \
|
||||
--team-id "TEAM_ID" \
|
||||
--password "app-specific-password"
|
||||
|
||||
# Wait for completion
|
||||
xcrun notarytool wait <submission-id> \
|
||||
--apple-id "your@email.com" \
|
||||
--team-id "TEAM_ID"
|
||||
|
||||
# Staple
|
||||
xcrun stapler staple ./app.dmg
|
||||
```
|
||||
|
||||
### Linux
|
||||
|
||||
```bash
|
||||
npm run tauri build -- --target x86_64-unknown-linux-gnu
|
||||
```
|
||||
|
||||
Outputs:
|
||||
- `src-tauri/target/release/bundle/deb/*.deb`
|
||||
- `src-tauri/target/release/bundle/appimage/*.AppImage`
|
||||
|
||||
## Mobile Distribution
|
||||
|
||||
### Android (Google Play)
|
||||
|
||||
1. Build signed AAB:
|
||||
```bash
|
||||
npm run tauri android build
|
||||
```
|
||||
|
||||
2. Upload to Play Console:
|
||||
- Create app in Google Play Console
|
||||
- Upload AAB from `src-tauri/gen/android/app/build/outputs/bundle/release/`
|
||||
- Complete store listing
|
||||
- Submit for review
|
||||
|
||||
### iOS (App Store)
|
||||
|
||||
1. Build release:
|
||||
```bash
|
||||
npm run tauri ios build
|
||||
```
|
||||
|
||||
2. Archive in Xcode:
|
||||
- Open `src-tauri/gen/apple/tauri-app.xcodeproj`
|
||||
- Product > Archive
|
||||
- Distribute App > App Store Connect
|
||||
|
||||
3. Complete in App Store Connect:
|
||||
- Fill app information
|
||||
- Upload screenshots
|
||||
- Submit for review
|
||||
|
||||
## Auto-Updates
|
||||
|
||||
### Setup Updater Plugin
|
||||
|
||||
```bash
|
||||
npm run tauri add updater
|
||||
```
|
||||
|
||||
### Configure
|
||||
|
||||
In `tauri.conf.json`:
|
||||
```json
|
||||
{
|
||||
"plugins": {
|
||||
"updater": {
|
||||
"pubkey": "YOUR_PUBLIC_KEY",
|
||||
"endpoints": [
|
||||
"https://releases.myapp.com/{{current_version}}"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Generate Keys
|
||||
|
||||
```bash
|
||||
npm run tauri signer generate -- -w ~/.tauri/myapp.key
|
||||
```
|
||||
|
||||
### Update Endpoint Response
|
||||
|
||||
```json
|
||||
{
|
||||
"version": "1.0.1",
|
||||
"notes": "Bug fixes and improvements",
|
||||
"pub_date": "2024-01-15T00:00:00Z",
|
||||
"platforms": {
|
||||
"darwin-aarch64": {
|
||||
"signature": "...",
|
||||
"url": "https://releases.myapp.com/tauri-app_1.0.1_aarch64.app.tar.gz"
|
||||
},
|
||||
"darwin-x86_64": {
|
||||
"signature": "...",
|
||||
"url": "https://releases.myapp.com/tauri-app_1.0.1_x64.app.tar.gz"
|
||||
},
|
||||
"windows-x86_64": {
|
||||
"signature": "...",
|
||||
"url": "https://releases.myapp.com/tauri-app_1.0.1_x64-setup.nsis.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Check for Updates (Frontend)
|
||||
|
||||
```typescript
|
||||
import { check } from '@tauri-apps/plugin-updater';
|
||||
|
||||
const update = await check();
|
||||
if (update?.available) {
|
||||
await update.downloadAndInstall();
|
||||
}
|
||||
```
|
||||
|
||||
## CI/CD Pipeline
|
||||
|
||||
### GitHub Actions Release
|
||||
|
||||
```yaml
|
||||
name: Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [macos-latest, ubuntu-latest, windows-latest]
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Install dependencies (Ubuntu)
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev
|
||||
|
||||
- run: npm ci
|
||||
- run: npm run tauri build
|
||||
|
||||
- uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
src-tauri/target/release/bundle/**/*
|
||||
```
|
||||
|
||||
## Checklist
|
||||
|
||||
### Before Release
|
||||
|
||||
- [ ] Update version in `package.json` and `tauri.conf.json`
|
||||
- [ ] Update `Cargo.toml` version
|
||||
- [ ] Run all tests
|
||||
- [ ] Test on all target platforms
|
||||
- [ ] Update changelog
|
||||
- [ ] Create git tag
|
||||
|
||||
### After Release
|
||||
|
||||
- [ ] Verify downloads work
|
||||
- [ ] Test auto-update
|
||||
- [ ] Monitor crash reports
|
||||
- [ ] Announce release
|
||||
@@ -0,0 +1,116 @@
|
||||
# Development Agent
|
||||
|
||||
## Purpose
|
||||
|
||||
Assists with day-to-day development tasks, code generation, and feature implementation.
|
||||
|
||||
## Capabilities
|
||||
|
||||
- Generate React components
|
||||
- Create Tauri commands
|
||||
- Set up plugins
|
||||
- Configure development environment
|
||||
|
||||
## Common Tasks
|
||||
|
||||
### Create New Component
|
||||
|
||||
```bash
|
||||
# Create component file
|
||||
touch src/components/MyComponent.tsx
|
||||
```
|
||||
|
||||
Template:
|
||||
```tsx
|
||||
import { FC } from 'react';
|
||||
import './MyComponent.css';
|
||||
|
||||
interface MyComponentProps {
|
||||
title: string;
|
||||
}
|
||||
|
||||
export const MyComponent: FC<MyComponentProps> = ({ title }) => {
|
||||
return (
|
||||
<div className="my-component">
|
||||
<h2>{title}</h2>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
### Create Tauri Command
|
||||
|
||||
1. Add to `src-tauri/src/lib.rs`:
|
||||
|
||||
```rust
|
||||
#[tauri::command]
|
||||
fn my_command(arg: String) -> Result<String, String> {
|
||||
Ok(format!("Received: {}", arg))
|
||||
}
|
||||
```
|
||||
|
||||
2. Register in builder:
|
||||
|
||||
```rust
|
||||
.invoke_handler(tauri::generate_handler![my_command])
|
||||
```
|
||||
|
||||
3. Call from frontend:
|
||||
|
||||
```typescript
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
const result = await invoke<string>('my_command', { arg: 'test' });
|
||||
```
|
||||
|
||||
### Add Plugin
|
||||
|
||||
```bash
|
||||
# Add plugin via CLI
|
||||
npm run tauri add <plugin-name>
|
||||
|
||||
# Common plugins:
|
||||
npm run tauri add fs
|
||||
npm run tauri add dialog
|
||||
npm run tauri add http
|
||||
npm run tauri add notification
|
||||
npm run tauri add store
|
||||
```
|
||||
|
||||
### Development Server
|
||||
|
||||
```bash
|
||||
# Start with hot reload
|
||||
npm run tauri dev
|
||||
|
||||
# Frontend only
|
||||
npm run dev
|
||||
|
||||
# Check for issues
|
||||
npm run tauri info
|
||||
```
|
||||
|
||||
## Code Style
|
||||
|
||||
### TypeScript
|
||||
|
||||
- Use functional components with hooks
|
||||
- Type all props and state
|
||||
- Use `invoke` for Tauri commands
|
||||
- Handle errors with try/catch
|
||||
|
||||
### Rust
|
||||
|
||||
- Use `#[tauri::command]` for commands
|
||||
- Return `Result<T, E>` for fallible operations
|
||||
- Use `State<>` for shared state
|
||||
- Keep commands async when doing I/O
|
||||
|
||||
## Testing
|
||||
|
||||
```bash
|
||||
# Frontend tests
|
||||
npm test
|
||||
|
||||
# Rust tests
|
||||
cd src-tauri && cargo test
|
||||
```
|
||||
@@ -0,0 +1,187 @@
|
||||
# Mobile Agent
|
||||
|
||||
## Purpose
|
||||
|
||||
Specializes in Android and iOS development, handling platform-specific configurations and debugging.
|
||||
|
||||
## Capabilities
|
||||
|
||||
- Configure Android and iOS projects
|
||||
- Handle mobile-specific features
|
||||
- Debug mobile applications
|
||||
- Manage app signing and distribution
|
||||
|
||||
## Android Development
|
||||
|
||||
### Setup
|
||||
|
||||
```bash
|
||||
# Initialize Android project
|
||||
npm run tauri android init
|
||||
|
||||
# Verify setup
|
||||
npm run tauri info
|
||||
```
|
||||
|
||||
### Development
|
||||
|
||||
```bash
|
||||
# Run on emulator
|
||||
npm run tauri android dev
|
||||
|
||||
# Run on device
|
||||
npm run tauri android dev -- --device
|
||||
|
||||
# List devices
|
||||
adb devices
|
||||
```
|
||||
|
||||
### Build
|
||||
|
||||
```bash
|
||||
# Debug APK
|
||||
npm run tauri android build -- --debug
|
||||
|
||||
# Release APK
|
||||
npm run tauri android build
|
||||
|
||||
# Specific ABI
|
||||
npm run tauri android build -- --target aarch64
|
||||
npm run tauri android build -- --target armv7
|
||||
npm run tauri android build -- --target i686
|
||||
npm run tauri android build -- --target x86_64
|
||||
```
|
||||
|
||||
### Signing
|
||||
|
||||
Create keystore:
|
||||
```bash
|
||||
keytool -genkey -v -keystore release.keystore \
|
||||
-alias my-key-alias \
|
||||
-keyalg RSA -keysize 2048 \
|
||||
-validity 10000
|
||||
```
|
||||
|
||||
### Debugging
|
||||
|
||||
```bash
|
||||
# View logs
|
||||
adb logcat | grep -i tauri
|
||||
|
||||
# Chrome DevTools
|
||||
chrome://inspect
|
||||
```
|
||||
|
||||
## iOS Development
|
||||
|
||||
### Setup
|
||||
|
||||
```bash
|
||||
# Initialize iOS project
|
||||
npm run tauri ios init
|
||||
|
||||
# Open in Xcode
|
||||
npm run tauri ios open
|
||||
```
|
||||
|
||||
### Development
|
||||
|
||||
```bash
|
||||
# Run on simulator
|
||||
npm run tauri ios dev
|
||||
|
||||
# Run on device
|
||||
npm run tauri ios dev -- --device
|
||||
|
||||
# List simulators
|
||||
xcrun simctl list devices
|
||||
```
|
||||
|
||||
### Build
|
||||
|
||||
```bash
|
||||
# Debug build
|
||||
npm run tauri ios build -- --debug
|
||||
|
||||
# Release build
|
||||
npm run tauri ios build
|
||||
```
|
||||
|
||||
### Signing
|
||||
|
||||
Set development team:
|
||||
```bash
|
||||
export APPLE_DEVELOPMENT_TEAM="YOUR_TEAM_ID"
|
||||
```
|
||||
|
||||
Or in `tauri.conf.json`:
|
||||
```json
|
||||
{
|
||||
"bundle": {
|
||||
"iOS": {
|
||||
"developmentTeam": "YOUR_TEAM_ID"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Debugging
|
||||
|
||||
```bash
|
||||
# Safari DevTools (for simulator)
|
||||
# Enable in Safari > Develop > Simulator
|
||||
|
||||
# Console logs
|
||||
npm run tauri ios dev -- --verbose
|
||||
```
|
||||
|
||||
## Mobile-Specific Features
|
||||
|
||||
### Safe Area
|
||||
|
||||
```css
|
||||
.app {
|
||||
padding-top: env(safe-area-inset-top);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
```
|
||||
|
||||
### Touch Events
|
||||
|
||||
```tsx
|
||||
<button
|
||||
onTouchStart={handleTouchStart}
|
||||
onTouchEnd={handleTouchEnd}
|
||||
>
|
||||
Touch Me
|
||||
</button>
|
||||
```
|
||||
|
||||
### Platform Detection
|
||||
|
||||
```typescript
|
||||
import { platform } from '@tauri-apps/plugin-os';
|
||||
|
||||
const os = await platform();
|
||||
if (os === 'android' || os === 'ios') {
|
||||
// Mobile-specific behavior
|
||||
}
|
||||
```
|
||||
|
||||
## Common Issues
|
||||
|
||||
### Android: "Connection refused"
|
||||
|
||||
- Ensure ADB is running: `adb start-server`
|
||||
- Restart ADB: `adb kill-server && adb start-server`
|
||||
|
||||
### iOS: "Code signing required"
|
||||
|
||||
- Add Apple ID to Xcode
|
||||
- Set development team in config
|
||||
|
||||
### Both: "App crashes on launch"
|
||||
|
||||
- Check logs for Rust panics
|
||||
- Verify all permissions are granted
|
||||
- Test on debug build first
|
||||
@@ -0,0 +1,217 @@
|
||||
# Test Agent
|
||||
|
||||
## Purpose
|
||||
|
||||
Manages testing strategies for both frontend and backend code across all platforms.
|
||||
|
||||
## Capabilities
|
||||
|
||||
- Run frontend unit tests
|
||||
- Run Rust unit tests
|
||||
- Set up integration tests
|
||||
- Configure E2E testing
|
||||
|
||||
## Frontend Testing
|
||||
|
||||
### Setup
|
||||
|
||||
```bash
|
||||
# Install testing dependencies
|
||||
npm install -D vitest @testing-library/react @testing-library/jest-dom jsdom
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
Create `vitest.config.ts`:
|
||||
```typescript
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import react from '@vitejs/plugin-react';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
test: {
|
||||
environment: 'jsdom',
|
||||
setupFiles: './src/test/setup.ts',
|
||||
globals: true,
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
Create `src/test/setup.ts`:
|
||||
```typescript
|
||||
import '@testing-library/jest-dom';
|
||||
import { vi } from 'vitest';
|
||||
|
||||
// Mock Tauri APIs
|
||||
vi.mock('@tauri-apps/api/core', () => ({
|
||||
invoke: vi.fn(),
|
||||
}));
|
||||
```
|
||||
|
||||
### Writing Tests
|
||||
|
||||
```typescript
|
||||
import { render, screen, fireEvent } from '@testing-library/react';
|
||||
import { describe, it, expect, vi } from 'vitest';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import App from './App';
|
||||
|
||||
describe('App', () => {
|
||||
it('renders greeting button', () => {
|
||||
render(<App />);
|
||||
expect(screen.getByText('Greet')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('calls greet command on click', async () => {
|
||||
vi.mocked(invoke).mockResolvedValue('Hello, World!');
|
||||
|
||||
render(<App />);
|
||||
fireEvent.click(screen.getByText('Greet'));
|
||||
|
||||
expect(invoke).toHaveBeenCalledWith('greet', { name: expect.any(String) });
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
### Running Tests
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
npm test
|
||||
|
||||
# Watch mode
|
||||
npm test -- --watch
|
||||
|
||||
# Coverage
|
||||
npm test -- --coverage
|
||||
```
|
||||
|
||||
## Rust Testing
|
||||
|
||||
### Unit Tests
|
||||
|
||||
In `src-tauri/src/lib.rs`:
|
||||
```rust
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_greet() {
|
||||
let result = greet("World");
|
||||
assert!(result.contains("World"));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_async_command() {
|
||||
let result = fetch_data("https://example.com").await;
|
||||
assert!(result.is_ok());
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Running Rust Tests
|
||||
|
||||
```bash
|
||||
cd src-tauri
|
||||
cargo test
|
||||
|
||||
# With output
|
||||
cargo test -- --nocapture
|
||||
|
||||
# Specific test
|
||||
cargo test test_greet
|
||||
```
|
||||
|
||||
## Integration Testing
|
||||
|
||||
### Tauri Driver (E2E)
|
||||
|
||||
```bash
|
||||
# Install WebDriver
|
||||
cargo install tauri-driver
|
||||
```
|
||||
|
||||
### WebDriver Test Example
|
||||
|
||||
```javascript
|
||||
const { Builder, By } = require('selenium-webdriver');
|
||||
|
||||
describe('App E2E', () => {
|
||||
let driver;
|
||||
|
||||
beforeAll(async () => {
|
||||
driver = await new Builder()
|
||||
.usingServer('http://localhost:4444')
|
||||
.forBrowser('tauri')
|
||||
.build();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await driver.quit();
|
||||
});
|
||||
|
||||
it('shows greeting', async () => {
|
||||
const button = await driver.findElement(By.css('button'));
|
||||
await button.click();
|
||||
|
||||
const message = await driver.findElement(By.css('.message'));
|
||||
expect(await message.getText()).toContain('Hello');
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
## Mobile Testing
|
||||
|
||||
### Android
|
||||
|
||||
```bash
|
||||
# Run instrumented tests
|
||||
cd src-tauri/gen/android
|
||||
./gradlew connectedAndroidTest
|
||||
```
|
||||
|
||||
### iOS
|
||||
|
||||
```bash
|
||||
# Run XCTest
|
||||
xcodebuild test \
|
||||
-project src-tauri/gen/apple/tauri-app.xcodeproj \
|
||||
-scheme tauri-app \
|
||||
-destination 'platform=iOS Simulator,name=iPhone 15'
|
||||
```
|
||||
|
||||
## Test Scripts
|
||||
|
||||
Add to `package.json`:
|
||||
```json
|
||||
{
|
||||
"scripts": {
|
||||
"test": "vitest",
|
||||
"test:watch": "vitest --watch",
|
||||
"test:coverage": "vitest --coverage",
|
||||
"test:rust": "cd src-tauri && cargo test",
|
||||
"test:all": "npm test && npm run test:rust"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## CI Integration
|
||||
|
||||
GitHub Actions example:
|
||||
```yaml
|
||||
name: Test
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
- run: cd src-tauri && cargo test
|
||||
```
|
||||
@@ -0,0 +1,46 @@
|
||||
# Project Overview
|
||||
|
||||
## Tauri Cross-Platform Application
|
||||
|
||||
This project is a Tauri v2 application designed to run on multiple platforms:
|
||||
|
||||
- **Windows** (Desktop)
|
||||
- **macOS** (Desktop)
|
||||
- **Android** (Mobile)
|
||||
- **iOS** (Mobile)
|
||||
|
||||
## Technology Stack
|
||||
|
||||
| Layer | Technology | Version |
|
||||
|-------|------------|---------|
|
||||
| Frontend | React | 19.1.0 |
|
||||
| Language | TypeScript | 5.8.3 |
|
||||
| Build Tool | Vite | 7.0.4 |
|
||||
| Backend | Rust | 1.93.0 |
|
||||
| Framework | Tauri | 2.x |
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
tauri-crossplatform-app/
|
||||
├── .claude/ # Claude AI configuration
|
||||
│ ├── rules/ # Modular documentation
|
||||
│ └── agents/ # Subagent configurations
|
||||
├── src/ # React frontend source
|
||||
├── src-tauri/ # Rust backend source
|
||||
│ ├── gen/ # Generated platform code
|
||||
│ │ ├── android/ # Android project
|
||||
│ │ └── apple/ # iOS/macOS project
|
||||
│ ├── icons/ # Application icons
|
||||
│ └── src/ # Rust source code
|
||||
├── public/ # Static assets
|
||||
└── dist/ # Build output
|
||||
```
|
||||
|
||||
## Key Configuration Files
|
||||
|
||||
- `tauri.conf.json` - Tauri configuration
|
||||
- `Cargo.toml` - Rust dependencies
|
||||
- `package.json` - Node.js dependencies
|
||||
- `vite.config.ts` - Vite build configuration
|
||||
- `tsconfig.json` - TypeScript configuration
|
||||
@@ -0,0 +1,165 @@
|
||||
# Development Commands
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before running any commands, ensure you have:
|
||||
|
||||
1. **Node.js** (v22+) and npm installed
|
||||
2. **Rust** installed via rustup
|
||||
3. **Platform-specific SDKs** (see platform setup guides)
|
||||
|
||||
## Common Commands
|
||||
|
||||
### Desktop Development
|
||||
|
||||
```bash
|
||||
# Start development server (hot-reload)
|
||||
npm run tauri dev
|
||||
|
||||
# Build for production
|
||||
npm run tauri build
|
||||
```
|
||||
|
||||
### Android Development
|
||||
|
||||
```bash
|
||||
# Initialize Android project (first time)
|
||||
npm run tauri android init
|
||||
|
||||
# Start Android development
|
||||
npm run tauri android dev
|
||||
|
||||
# Build Android APK/AAB
|
||||
npm run tauri android build
|
||||
```
|
||||
|
||||
### iOS Development
|
||||
|
||||
```bash
|
||||
# Initialize iOS project (first time)
|
||||
npm run tauri ios init
|
||||
|
||||
# Start iOS development
|
||||
npm run tauri ios dev
|
||||
|
||||
# Build iOS app
|
||||
npm run tauri ios build
|
||||
```
|
||||
|
||||
### Frontend Only
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
npm install
|
||||
|
||||
# Start Vite dev server only
|
||||
npm run dev
|
||||
|
||||
# Build frontend only
|
||||
npm run build
|
||||
|
||||
# Preview production build
|
||||
npm run preview
|
||||
```
|
||||
|
||||
## Stopping Development Servers
|
||||
|
||||
### Desktop (Tauri Dev)
|
||||
|
||||
```bash
|
||||
# In the terminal running `npm run tauri dev`:
|
||||
Ctrl + C
|
||||
|
||||
# If process is stuck, force kill:
|
||||
# macOS/Linux:
|
||||
pkill -f "tauri dev"
|
||||
pkill -f "cargo-tauri"
|
||||
lsof -ti:1420 | xargs kill -9 # Kill process on Vite port
|
||||
|
||||
# Windows (PowerShell):
|
||||
Stop-Process -Name "tauri-app" -Force
|
||||
Get-Process | Where-Object {$_.ProcessName -like "*tauri*"} | Stop-Process -Force
|
||||
netstat -ano | findstr :1420 # Find PID on port 1420
|
||||
taskkill /PID <PID> /F # Kill by PID
|
||||
```
|
||||
|
||||
### Android Dev Server
|
||||
|
||||
```bash
|
||||
# In the terminal running `npm run tauri android dev`:
|
||||
Ctrl + C
|
||||
|
||||
# If emulator/device is stuck:
|
||||
adb kill-server # Stop ADB server
|
||||
adb start-server # Restart ADB server
|
||||
|
||||
# Force stop app on device:
|
||||
adb shell am force-stop com.megamind.tauri-app
|
||||
|
||||
# Kill Gradle daemon if stuck:
|
||||
# macOS/Linux:
|
||||
pkill -f "gradle"
|
||||
./gradlew --stop # From src-tauri/gen/android/
|
||||
|
||||
# Windows:
|
||||
taskkill /F /IM java.exe # Kills Gradle processes
|
||||
```
|
||||
|
||||
### iOS Dev Server
|
||||
|
||||
```bash
|
||||
# In the terminal running `npm run tauri ios dev`:
|
||||
Ctrl + C
|
||||
|
||||
# If simulator is stuck:
|
||||
xcrun simctl shutdown all # Shutdown all simulators
|
||||
xcrun simctl erase all # Reset all simulators (clears data)
|
||||
|
||||
# Kill specific simulator:
|
||||
xcrun simctl shutdown booted # Shutdown currently running simulator
|
||||
|
||||
# Force kill Xcode processes:
|
||||
pkill -f "Simulator"
|
||||
pkill -f "xcodebuild"
|
||||
|
||||
# If build process hangs:
|
||||
pkill -f "cargo"
|
||||
```
|
||||
|
||||
### Frontend Only (Vite)
|
||||
|
||||
```bash
|
||||
# In the terminal running `npm run dev`:
|
||||
Ctrl + C
|
||||
|
||||
# If port 1420 is still occupied:
|
||||
# macOS/Linux:
|
||||
lsof -ti:1420 | xargs kill -9
|
||||
|
||||
# Windows:
|
||||
netstat -ano | findstr :1420
|
||||
taskkill /PID <PID> /F
|
||||
```
|
||||
|
||||
### Kill All Development Processes
|
||||
|
||||
```bash
|
||||
# macOS/Linux - Nuclear option (kills all related processes):
|
||||
pkill -f "tauri"
|
||||
pkill -f "vite"
|
||||
pkill -f "cargo"
|
||||
pkill -f "node.*tauri"
|
||||
|
||||
# Windows (PowerShell):
|
||||
Get-Process | Where-Object {$_.ProcessName -match "tauri|vite|cargo|node"} | Stop-Process -Force
|
||||
```
|
||||
|
||||
## Build Targets
|
||||
|
||||
| Platform | Command | Output |
|
||||
|----------|---------|--------|
|
||||
| Windows | `npm run tauri build` | `.msi`, `.exe` |
|
||||
| macOS | `npm run tauri build` | `.dmg`, `.app` |
|
||||
| Linux | `npm run tauri build` | `.deb`, `.AppImage` |
|
||||
| Android | `npm run tauri android build` | `.apk`, `.aab` |
|
||||
| iOS | `npm run tauri ios build` | `.ipa` |
|
||||
@@ -0,0 +1,59 @@
|
||||
# Windows Platform Setup
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### 1. Microsoft Visual Studio C++ Build Tools
|
||||
|
||||
Download and install from: https://visualstudio.microsoft.com/visual-cpp-build-tools/
|
||||
|
||||
During installation, select:
|
||||
- "Desktop development with C++"
|
||||
- Windows 10/11 SDK
|
||||
- MSVC v143+ build tools
|
||||
|
||||
### 2. WebView2
|
||||
|
||||
Windows 10 (1803+) and Windows 11 include WebView2 by default.
|
||||
|
||||
For older systems, download from: https://developer.microsoft.com/microsoft-edge/webview2/
|
||||
|
||||
### 3. Rust
|
||||
|
||||
Install via rustup:
|
||||
```powershell
|
||||
winget install Rustlang.Rustup
|
||||
```
|
||||
|
||||
Or download from: https://rustup.rs
|
||||
|
||||
## Building for Windows
|
||||
|
||||
```bash
|
||||
# Build for current architecture
|
||||
npm run tauri build
|
||||
|
||||
# Build for specific target
|
||||
npm run tauri build -- --target x86_64-pc-windows-msvc
|
||||
npm run tauri build -- --target aarch64-pc-windows-msvc
|
||||
```
|
||||
|
||||
## Output Files
|
||||
|
||||
After building, find installers in:
|
||||
```
|
||||
src-tauri/target/release/bundle/
|
||||
├── msi/
|
||||
│ └── tauri-app_0.1.0_x64_en-US.msi
|
||||
└── nsis/
|
||||
└── tauri-app_0.1.0_x64-setup.exe
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Missing Visual C++ Redistributable
|
||||
|
||||
If users report missing DLLs, bundle the Visual C++ Redistributable or instruct users to install it.
|
||||
|
||||
### WebView2 Issues
|
||||
|
||||
For enterprise environments, WebView2 fixed version runtime can be bundled with the app.
|
||||
@@ -0,0 +1,87 @@
|
||||
# macOS Platform Setup
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### 1. Xcode
|
||||
|
||||
Install from the Mac App Store or:
|
||||
```bash
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
### 2. Xcode Command Line Tools
|
||||
|
||||
```bash
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
### 3. Rust
|
||||
|
||||
```bash
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
```
|
||||
|
||||
### 4. Additional Dependencies (via Homebrew)
|
||||
|
||||
For iOS development:
|
||||
```bash
|
||||
brew install xcodegen
|
||||
brew install libimobiledevice
|
||||
```
|
||||
|
||||
## Building for macOS
|
||||
|
||||
```bash
|
||||
# Build for current architecture
|
||||
npm run tauri build
|
||||
|
||||
# Build universal binary (Intel + Apple Silicon)
|
||||
npm run tauri build -- --target universal-apple-darwin
|
||||
```
|
||||
|
||||
## Output Files
|
||||
|
||||
After building, find installers in:
|
||||
```
|
||||
src-tauri/target/release/bundle/
|
||||
├── macos/
|
||||
│ └── tauri-app.app
|
||||
└── dmg/
|
||||
└── tauri-app_0.1.0_x64.dmg
|
||||
```
|
||||
|
||||
## Code Signing
|
||||
|
||||
### Development
|
||||
|
||||
For local development, no code signing is required.
|
||||
|
||||
### Distribution
|
||||
|
||||
Set up code signing for App Store or notarization:
|
||||
|
||||
1. Enroll in Apple Developer Program
|
||||
2. Create signing certificates
|
||||
3. Configure in `tauri.conf.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"bundle": {
|
||||
"macOS": {
|
||||
"signingIdentity": "Developer ID Application: Your Name (TEAM_ID)"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Notarization
|
||||
|
||||
For distribution outside the App Store:
|
||||
|
||||
```bash
|
||||
# Build and notarize
|
||||
npm run tauri build -- --target universal-apple-darwin
|
||||
|
||||
# Or use xcrun for manual notarization
|
||||
xcrun notarytool submit ./path/to/app.dmg --apple-id "your@email.com" --team-id "TEAM_ID"
|
||||
```
|
||||
@@ -0,0 +1,117 @@
|
||||
# Android Platform Setup
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### 1. Android Studio
|
||||
|
||||
Download and install from: https://developer.android.com/studio
|
||||
|
||||
### 2. Android SDK
|
||||
|
||||
After installing Android Studio:
|
||||
|
||||
1. Open Android Studio
|
||||
2. Go to **Settings > Languages & Frameworks > Android SDK**
|
||||
3. Install:
|
||||
- Android SDK Platform 34 (or latest)
|
||||
- Android SDK Build-Tools
|
||||
- Android SDK Platform-Tools
|
||||
- NDK (Side by side)
|
||||
|
||||
### 3. Environment Variables
|
||||
|
||||
Add to your shell profile (`~/.zshrc` or `~/.bashrc`):
|
||||
|
||||
```bash
|
||||
export ANDROID_HOME="$HOME/Library/Android/sdk"
|
||||
export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk | tail -n 1)"
|
||||
export PATH="$PATH:$ANDROID_HOME/platform-tools"
|
||||
export PATH="$PATH:$ANDROID_HOME/tools/bin"
|
||||
```
|
||||
|
||||
### 4. Rust Android Targets
|
||||
|
||||
```bash
|
||||
rustup target add aarch64-linux-android
|
||||
rustup target add armv7-linux-androideabi
|
||||
rustup target add i686-linux-android
|
||||
rustup target add x86_64-linux-android
|
||||
```
|
||||
|
||||
## Initialize Android Project
|
||||
|
||||
```bash
|
||||
npm run tauri android init
|
||||
```
|
||||
|
||||
This creates the Android project in `src-tauri/gen/android/`.
|
||||
|
||||
## Development
|
||||
|
||||
### Using Emulator
|
||||
|
||||
1. Open Android Studio
|
||||
2. Create AVD (Android Virtual Device)
|
||||
3. Start the emulator
|
||||
4. Run: `npm run tauri android dev`
|
||||
|
||||
### Using Physical Device
|
||||
|
||||
1. Enable Developer Options on device
|
||||
2. Enable USB Debugging
|
||||
3. Connect device via USB
|
||||
4. Run: `npm run tauri android dev`
|
||||
|
||||
## Building for Android
|
||||
|
||||
```bash
|
||||
# Debug build
|
||||
npm run tauri android build -- --debug
|
||||
|
||||
# Release build
|
||||
npm run tauri android build
|
||||
```
|
||||
|
||||
## Output Files
|
||||
|
||||
```
|
||||
src-tauri/gen/android/app/build/outputs/
|
||||
├── apk/
|
||||
│ ├── debug/
|
||||
│ │ └── app-debug.apk
|
||||
│ └── release/
|
||||
│ └── app-release-unsigned.apk
|
||||
└── bundle/
|
||||
└── release/
|
||||
└── app-release.aab
|
||||
```
|
||||
|
||||
## Signing for Release
|
||||
|
||||
### Create Keystore
|
||||
|
||||
```bash
|
||||
keytool -genkey -v -keystore release.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
|
||||
```
|
||||
|
||||
### Configure Signing
|
||||
|
||||
Edit `src-tauri/gen/android/app/build.gradle.kts`:
|
||||
|
||||
```kotlin
|
||||
android {
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
storeFile = file("path/to/release.keystore")
|
||||
storePassword = System.getenv("KEYSTORE_PASSWORD")
|
||||
keyAlias = "my-key-alias"
|
||||
keyPassword = System.getenv("KEY_PASSWORD")
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,133 @@
|
||||
# iOS Platform Setup
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### 1. macOS
|
||||
|
||||
iOS development requires a Mac with macOS.
|
||||
|
||||
### 2. Xcode
|
||||
|
||||
Install from the Mac App Store (requires latest version for latest iOS SDKs).
|
||||
|
||||
### 3. Xcode Command Line Tools
|
||||
|
||||
```bash
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
### 4. Additional Tools
|
||||
|
||||
```bash
|
||||
brew install xcodegen
|
||||
brew install libimobiledevice
|
||||
brew install ios-deploy
|
||||
```
|
||||
|
||||
### 5. CocoaPods
|
||||
|
||||
```bash
|
||||
sudo gem install cocoapods
|
||||
```
|
||||
|
||||
### 6. Rust iOS Targets
|
||||
|
||||
```bash
|
||||
rustup target add aarch64-apple-ios
|
||||
rustup target add aarch64-apple-ios-sim
|
||||
rustup target add x86_64-apple-ios
|
||||
```
|
||||
|
||||
## Initialize iOS Project
|
||||
|
||||
```bash
|
||||
npm run tauri ios init
|
||||
```
|
||||
|
||||
This creates the iOS project in `src-tauri/gen/apple/`.
|
||||
|
||||
## Apple Developer Account
|
||||
|
||||
### For Development
|
||||
|
||||
- Free Apple ID allows testing on your own devices
|
||||
- Must register device UDID in Xcode
|
||||
|
||||
### For Distribution
|
||||
|
||||
- Requires paid Apple Developer Program ($99/year)
|
||||
- Needed for App Store, TestFlight, or Ad Hoc distribution
|
||||
|
||||
## Development Team Configuration
|
||||
|
||||
Set in `tauri.conf.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"bundle": {
|
||||
"iOS": {
|
||||
"developmentTeam": "YOUR_TEAM_ID"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Or via environment variable:
|
||||
```bash
|
||||
export APPLE_DEVELOPMENT_TEAM="YOUR_TEAM_ID"
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
### Using Simulator
|
||||
|
||||
```bash
|
||||
# List available simulators
|
||||
xcrun simctl list devices
|
||||
|
||||
# Run on simulator
|
||||
npm run tauri ios dev
|
||||
```
|
||||
|
||||
### Using Physical Device
|
||||
|
||||
1. Connect device via USB
|
||||
2. Trust the computer on the device
|
||||
3. Run: `npm run tauri ios dev -- --device`
|
||||
|
||||
## Building for iOS
|
||||
|
||||
```bash
|
||||
# Debug build
|
||||
npm run tauri ios build -- --debug
|
||||
|
||||
# Release build
|
||||
npm run tauri ios build
|
||||
```
|
||||
|
||||
## Output Files
|
||||
|
||||
```
|
||||
src-tauri/gen/apple/build/
|
||||
└── arm64/
|
||||
└── tauri-app.app
|
||||
```
|
||||
|
||||
## Code Signing
|
||||
|
||||
### Automatic Signing
|
||||
|
||||
Xcode can manage signing automatically when configured with your Apple ID.
|
||||
|
||||
### Manual Signing
|
||||
|
||||
1. Create provisioning profile in Apple Developer Portal
|
||||
2. Download and install in Xcode
|
||||
3. Configure in Xcode project settings
|
||||
|
||||
## App Store Submission
|
||||
|
||||
1. Build release version
|
||||
2. Archive in Xcode
|
||||
3. Upload via Xcode Organizer or Transporter
|
||||
4. Complete submission in App Store Connect
|
||||
@@ -0,0 +1,166 @@
|
||||
# Rust Backend Guide
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
src-tauri/
|
||||
├── Cargo.toml # Rust dependencies
|
||||
├── build.rs # Build script
|
||||
├── tauri.conf.json # Tauri configuration
|
||||
├── capabilities/ # Permission configurations
|
||||
├── icons/ # App icons
|
||||
└── src/
|
||||
├── lib.rs # Library crate (for mobile)
|
||||
└── main.rs # Binary crate (for desktop)
|
||||
```
|
||||
|
||||
## Creating Commands
|
||||
|
||||
Commands allow the frontend to call Rust functions.
|
||||
|
||||
### Basic Command
|
||||
|
||||
```rust
|
||||
// src-tauri/src/lib.rs
|
||||
|
||||
#[tauri::command]
|
||||
fn greet(name: &str) -> String {
|
||||
format!("Hello, {}! You've been greeted from Rust!", name)
|
||||
}
|
||||
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.invoke_handler(tauri::generate_handler![greet])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
```
|
||||
|
||||
### Async Command
|
||||
|
||||
```rust
|
||||
#[tauri::command]
|
||||
async fn fetch_data(url: String) -> Result<String, String> {
|
||||
reqwest::get(&url)
|
||||
.await
|
||||
.map_err(|e| e.to_string())?
|
||||
.text()
|
||||
.await
|
||||
.map_err(|e| e.to_string())
|
||||
}
|
||||
```
|
||||
|
||||
### Command with State
|
||||
|
||||
```rust
|
||||
use std::sync::Mutex;
|
||||
use tauri::State;
|
||||
|
||||
struct AppState {
|
||||
counter: Mutex<i32>,
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn increment(state: State<AppState>) -> i32 {
|
||||
let mut counter = state.counter.lock().unwrap();
|
||||
*counter += 1;
|
||||
*counter
|
||||
}
|
||||
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.manage(AppState {
|
||||
counter: Mutex::new(0),
|
||||
})
|
||||
.invoke_handler(tauri::generate_handler![increment])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
```
|
||||
|
||||
## Calling Commands from Frontend
|
||||
|
||||
```typescript
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
|
||||
// Basic call
|
||||
const greeting = await invoke<string>('greet', { name: 'World' });
|
||||
|
||||
// With error handling
|
||||
try {
|
||||
const data = await invoke<string>('fetch_data', { url: 'https://api.example.com' });
|
||||
} catch (error) {
|
||||
console.error('Command failed:', error);
|
||||
}
|
||||
```
|
||||
|
||||
## Events
|
||||
|
||||
### Emit from Rust
|
||||
|
||||
```rust
|
||||
use tauri::Emitter;
|
||||
|
||||
#[tauri::command]
|
||||
fn start_process(app: tauri::AppHandle) {
|
||||
std::thread::spawn(move || {
|
||||
// Do work...
|
||||
app.emit("process-complete", "Done!").unwrap();
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
### Listen in Frontend
|
||||
|
||||
```typescript
|
||||
import { listen } from '@tauri-apps/api/event';
|
||||
|
||||
const unlisten = await listen('process-complete', (event) => {
|
||||
console.log('Process completed:', event.payload);
|
||||
});
|
||||
|
||||
// Later: unlisten();
|
||||
```
|
||||
|
||||
## Adding Dependencies
|
||||
|
||||
Edit `src-tauri/Cargo.toml`:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
tauri = { version = "2", features = [] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
reqwest = { version = "0.11", features = ["json"] }
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
```
|
||||
|
||||
## Platform-Specific Code
|
||||
|
||||
```rust
|
||||
#[cfg(target_os = "windows")]
|
||||
fn platform_specific() {
|
||||
// Windows-only code
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
fn platform_specific() {
|
||||
// macOS-only code
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
fn platform_specific() {
|
||||
// Linux-only code
|
||||
}
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
fn platform_specific() {
|
||||
// Android-only code
|
||||
}
|
||||
|
||||
#[cfg(target_os = "ios")]
|
||||
fn platform_specific() {
|
||||
// iOS-only code
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,221 @@
|
||||
# Frontend Development Guide
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
src/
|
||||
├── App.tsx # Main application component
|
||||
├── App.css # Application styles
|
||||
├── main.tsx # Entry point
|
||||
├── vite-env.d.ts # Vite type definitions
|
||||
└── assets/ # Static assets
|
||||
```
|
||||
|
||||
## React with Tauri
|
||||
|
||||
### Basic Component
|
||||
|
||||
```tsx
|
||||
import { useState } from 'react';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
|
||||
function App() {
|
||||
const [result, setResult] = useState('');
|
||||
|
||||
async function handleClick() {
|
||||
const greeting = await invoke<string>('greet', { name: 'User' });
|
||||
setResult(greeting);
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<button onClick={handleClick}>Greet</button>
|
||||
<p>{result}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
```
|
||||
|
||||
## Tauri APIs
|
||||
|
||||
### Window Management
|
||||
|
||||
```typescript
|
||||
import { getCurrentWindow } from '@tauri-apps/api/window';
|
||||
|
||||
const appWindow = getCurrentWindow();
|
||||
|
||||
// Minimize
|
||||
await appWindow.minimize();
|
||||
|
||||
// Maximize
|
||||
await appWindow.maximize();
|
||||
|
||||
// Close
|
||||
await appWindow.close();
|
||||
|
||||
// Set title
|
||||
await appWindow.setTitle('New Title');
|
||||
```
|
||||
|
||||
### File System
|
||||
|
||||
First, add the plugin:
|
||||
```bash
|
||||
npm run tauri add fs
|
||||
```
|
||||
|
||||
```typescript
|
||||
import { readTextFile, writeTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';
|
||||
|
||||
// Read file
|
||||
const content = await readTextFile('config.json', {
|
||||
baseDir: BaseDirectory.AppData
|
||||
});
|
||||
|
||||
// Write file
|
||||
await writeTextFile('config.json', JSON.stringify(data), {
|
||||
baseDir: BaseDirectory.AppData
|
||||
});
|
||||
```
|
||||
|
||||
### Dialogs
|
||||
|
||||
First, add the plugin:
|
||||
```bash
|
||||
npm run tauri add dialog
|
||||
```
|
||||
|
||||
```typescript
|
||||
import { open, save, message } from '@tauri-apps/plugin-dialog';
|
||||
|
||||
// Open file picker
|
||||
const filePath = await open({
|
||||
multiple: false,
|
||||
filters: [{
|
||||
name: 'Text',
|
||||
extensions: ['txt', 'md']
|
||||
}]
|
||||
});
|
||||
|
||||
// Save dialog
|
||||
const savePath = await save({
|
||||
defaultPath: 'document.txt'
|
||||
});
|
||||
|
||||
// Message box
|
||||
await message('Operation completed!', { title: 'Success' });
|
||||
```
|
||||
|
||||
### HTTP Requests
|
||||
|
||||
First, add the plugin:
|
||||
```bash
|
||||
npm run tauri add http
|
||||
```
|
||||
|
||||
```typescript
|
||||
import { fetch } from '@tauri-apps/plugin-http';
|
||||
|
||||
const response = await fetch('https://api.example.com/data', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
```
|
||||
|
||||
## Platform Detection
|
||||
|
||||
```typescript
|
||||
import { platform } from '@tauri-apps/plugin-os';
|
||||
|
||||
const currentPlatform = await platform();
|
||||
|
||||
switch (currentPlatform) {
|
||||
case 'windows':
|
||||
// Windows-specific UI
|
||||
break;
|
||||
case 'macos':
|
||||
// macOS-specific UI
|
||||
break;
|
||||
case 'linux':
|
||||
// Linux-specific UI
|
||||
break;
|
||||
case 'android':
|
||||
// Android-specific UI
|
||||
break;
|
||||
case 'ios':
|
||||
// iOS-specific UI
|
||||
break;
|
||||
}
|
||||
```
|
||||
|
||||
## Responsive Design for Mobile
|
||||
|
||||
```css
|
||||
/* Base styles for mobile-first */
|
||||
.container {
|
||||
padding: 16px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* Tablet and larger */
|
||||
@media (min-width: 768px) {
|
||||
.container {
|
||||
padding: 24px;
|
||||
max-width: 720px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* Desktop */
|
||||
@media (min-width: 1024px) {
|
||||
.container {
|
||||
max-width: 960px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Safe areas for notched devices (iOS) */
|
||||
.app {
|
||||
padding-top: env(safe-area-inset-top);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
padding-left: env(safe-area-inset-left);
|
||||
padding-right: env(safe-area-inset-right);
|
||||
}
|
||||
```
|
||||
|
||||
## State Management
|
||||
|
||||
For larger applications, consider:
|
||||
|
||||
- **Zustand** - Lightweight state management
|
||||
- **Jotai** - Atomic state management
|
||||
- **Redux Toolkit** - Full-featured state management
|
||||
|
||||
```bash
|
||||
npm install zustand
|
||||
```
|
||||
|
||||
```typescript
|
||||
import { create } from 'zustand';
|
||||
|
||||
interface AppState {
|
||||
count: number;
|
||||
increment: () => void;
|
||||
}
|
||||
|
||||
const useStore = create<AppState>((set) => ({
|
||||
count: 0,
|
||||
increment: () => set((state) => ({ count: state.count + 1 })),
|
||||
}));
|
||||
|
||||
function Counter() {
|
||||
const { count, increment } = useStore();
|
||||
return <button onClick={increment}>{count}</button>;
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,156 @@
|
||||
# Permissions and Capabilities
|
||||
|
||||
## Overview
|
||||
|
||||
Tauri v2 uses a capability-based security model. Permissions must be explicitly granted for the frontend to access system resources.
|
||||
|
||||
## Capability Files
|
||||
|
||||
Located in `src-tauri/capabilities/`:
|
||||
|
||||
```
|
||||
src-tauri/capabilities/
|
||||
├── default.json # Default permissions for all windows
|
||||
└── mobile.json # Mobile-specific permissions
|
||||
```
|
||||
|
||||
## Default Capability
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "../gen/schemas/desktop-schema.json",
|
||||
"identifier": "default",
|
||||
"description": "Default permissions for the main window",
|
||||
"windows": ["main"],
|
||||
"permissions": [
|
||||
"core:default",
|
||||
"opener:default"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Adding Permissions
|
||||
|
||||
### File System Access
|
||||
|
||||
```json
|
||||
{
|
||||
"permissions": [
|
||||
"fs:default",
|
||||
"fs:allow-read-text-file",
|
||||
"fs:allow-write-text-file",
|
||||
{
|
||||
"identifier": "fs:scope",
|
||||
"allow": [
|
||||
"$APPDATA/*",
|
||||
"$DOCUMENT/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Dialog Access
|
||||
|
||||
```json
|
||||
{
|
||||
"permissions": [
|
||||
"dialog:default",
|
||||
"dialog:allow-open",
|
||||
"dialog:allow-save",
|
||||
"dialog:allow-message"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### HTTP Access
|
||||
|
||||
```json
|
||||
{
|
||||
"permissions": [
|
||||
"http:default",
|
||||
{
|
||||
"identifier": "http:scope",
|
||||
"allow": [
|
||||
{ "url": "https://api.example.com/*" },
|
||||
{ "url": "https://*.myapp.com/*" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Notification Access
|
||||
|
||||
```json
|
||||
{
|
||||
"permissions": [
|
||||
"notification:default",
|
||||
"notification:allow-is-permission-granted",
|
||||
"notification:allow-request-permission",
|
||||
"notification:allow-notify"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Mobile-Specific Capabilities
|
||||
|
||||
Create `src-tauri/capabilities/mobile.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "../gen/schemas/mobile-schema.json",
|
||||
"identifier": "mobile",
|
||||
"description": "Mobile-specific permissions",
|
||||
"platforms": ["android", "iOS"],
|
||||
"windows": ["main"],
|
||||
"permissions": [
|
||||
"core:default",
|
||||
"barcode-scanner:default",
|
||||
"biometric:default",
|
||||
"haptics:default"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Available Permission Plugins
|
||||
|
||||
| Plugin | Description | Install Command |
|
||||
|--------|-------------|-----------------|
|
||||
| fs | File system access | `npm run tauri add fs` |
|
||||
| dialog | System dialogs | `npm run tauri add dialog` |
|
||||
| http | HTTP requests | `npm run tauri add http` |
|
||||
| notification | System notifications | `npm run tauri add notification` |
|
||||
| clipboard | Clipboard access | `npm run tauri add clipboard-manager` |
|
||||
| shell | Shell commands | `npm run tauri add shell` |
|
||||
| store | Persistent storage | `npm run tauri add store` |
|
||||
| os | OS information | `npm run tauri add os` |
|
||||
|
||||
## Scope Paths
|
||||
|
||||
Available path variables:
|
||||
|
||||
| Variable | Description |
|
||||
|----------|-------------|
|
||||
| `$APPDATA` | Application data directory |
|
||||
| `$APPCONFIG` | Application config directory |
|
||||
| `$APPLOCALDATA` | Application local data |
|
||||
| `$APPCACHE` | Application cache |
|
||||
| `$APPLOG` | Application logs |
|
||||
| `$AUDIO` | User's audio directory |
|
||||
| `$CACHE` | System cache |
|
||||
| `$CONFIG` | System config |
|
||||
| `$DATA` | System data |
|
||||
| `$DOCUMENT` | User's documents |
|
||||
| `$DOWNLOAD` | User's downloads |
|
||||
| `$PICTURE` | User's pictures |
|
||||
| `$VIDEO` | User's videos |
|
||||
| `$TEMP` | Temporary directory |
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Principle of Least Privilege**: Only request permissions you need
|
||||
2. **Scope Restrictions**: Limit file access to specific directories
|
||||
3. **URL Whitelisting**: Only allow HTTP to known domains
|
||||
4. **Platform Separation**: Use separate capability files for mobile/desktop
|
||||
5. **Document Permissions**: Comment why each permission is needed
|
||||
@@ -0,0 +1,158 @@
|
||||
# Troubleshooting Guide
|
||||
|
||||
## Common Issues
|
||||
|
||||
### Build Errors
|
||||
|
||||
#### "error: failed to run custom build command for `tauri`"
|
||||
|
||||
**Cause**: Missing system dependencies
|
||||
|
||||
**Solution**:
|
||||
- macOS: `xcode-select --install`
|
||||
- Windows: Install Visual Studio Build Tools
|
||||
- Linux: `sudo apt install libwebkit2gtk-4.1-dev build-essential libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev`
|
||||
|
||||
#### "cargo: command not found"
|
||||
|
||||
**Cause**: Rust not installed or not in PATH
|
||||
|
||||
**Solution**:
|
||||
```bash
|
||||
source "$HOME/.cargo/env"
|
||||
# Or reinstall Rust
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
```
|
||||
|
||||
### Development Server Issues
|
||||
|
||||
#### Frontend loads but shows blank page
|
||||
|
||||
**Cause**: Dev server not running or wrong port
|
||||
|
||||
**Solution**:
|
||||
1. Check `devUrl` in `tauri.conf.json` matches Vite port
|
||||
2. Start frontend first: `npm run dev`
|
||||
3. Then: `npm run tauri dev`
|
||||
|
||||
#### Hot reload not working
|
||||
|
||||
**Cause**: File watcher issues
|
||||
|
||||
**Solution**:
|
||||
- macOS: Increase file descriptor limit
|
||||
- Windows: Disable antivirus scanning on project folder
|
||||
- All: Restart dev server
|
||||
|
||||
### Android Issues
|
||||
|
||||
#### "ANDROID_HOME not set"
|
||||
|
||||
**Solution**:
|
||||
```bash
|
||||
export ANDROID_HOME="$HOME/Library/Android/sdk"
|
||||
export PATH="$PATH:$ANDROID_HOME/platform-tools"
|
||||
```
|
||||
|
||||
Add to `~/.zshrc` or `~/.bashrc` for persistence.
|
||||
|
||||
#### "No connected devices"
|
||||
|
||||
**Solution**:
|
||||
1. Enable Developer Options on device
|
||||
2. Enable USB Debugging
|
||||
3. Accept RSA key prompt on device
|
||||
4. Run: `adb devices` to verify connection
|
||||
|
||||
#### "NDK not found"
|
||||
|
||||
**Solution**:
|
||||
1. Open Android Studio
|
||||
2. Settings > Languages & Frameworks > Android SDK
|
||||
3. SDK Tools tab > Check "NDK (Side by side)"
|
||||
4. Install latest NDK
|
||||
|
||||
### iOS Issues
|
||||
|
||||
#### "No code signing certificates found"
|
||||
|
||||
**Solution**:
|
||||
1. Open Xcode
|
||||
2. Preferences > Accounts > Add Apple ID
|
||||
3. Let Xcode manage signing automatically
|
||||
4. Or set `APPLE_DEVELOPMENT_TEAM` environment variable
|
||||
|
||||
#### "Unable to install app on device"
|
||||
|
||||
**Solution**:
|
||||
1. Device must be registered in your developer account
|
||||
2. Create provisioning profile including the device
|
||||
3. Trust developer in Settings > General > Device Management
|
||||
|
||||
#### Simulator not launching
|
||||
|
||||
**Solution**:
|
||||
```bash
|
||||
# Reset simulator
|
||||
xcrun simctl erase all
|
||||
|
||||
# Or boot specific simulator
|
||||
xcrun simctl boot "iPhone 15"
|
||||
```
|
||||
|
||||
### Performance Issues
|
||||
|
||||
#### App runs slowly
|
||||
|
||||
**Solutions**:
|
||||
1. Enable release mode: `npm run tauri build`
|
||||
2. Check for unnecessary re-renders in React
|
||||
3. Profile Rust code with `cargo flamegraph`
|
||||
|
||||
#### Large bundle size
|
||||
|
||||
**Solutions**:
|
||||
1. Enable stripping in `Cargo.toml`:
|
||||
```toml
|
||||
[profile.release]
|
||||
strip = true
|
||||
lto = true
|
||||
```
|
||||
2. Analyze frontend bundle: `npm run build -- --analyze`
|
||||
3. Remove unused dependencies
|
||||
|
||||
### Plugin Issues
|
||||
|
||||
#### "Plugin not initialized"
|
||||
|
||||
**Cause**: Plugin not added to Tauri builder
|
||||
|
||||
**Solution**:
|
||||
Check `src-tauri/src/lib.rs`:
|
||||
```rust
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_fs::init()) // Add plugin here
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
```
|
||||
|
||||
#### "Permission denied" for plugin
|
||||
|
||||
**Cause**: Missing capability
|
||||
|
||||
**Solution**:
|
||||
Add permission to `src-tauri/capabilities/default.json`:
|
||||
```json
|
||||
{
|
||||
"permissions": [
|
||||
"fs:default",
|
||||
"fs:allow-read-text-file"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Getting Help
|
||||
|
||||
1. **Tauri Discord**: https://discord.gg/tauri
|
||||
2. **GitHub Issues**: https://github.com/tauri-apps/tauri/issues
|
||||
3. **Documentation**: https://tauri.app/
|
||||
4. **Stack Overflow**: Tag with `tauri`
|
||||
@@ -0,0 +1,24 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# Tauri + React + Typescript
|
||||
|
||||
This template should help get you started developing with Tauri, React and Typescript in Vite.
|
||||
|
||||
## Recommended IDE Setup
|
||||
|
||||
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
|
||||
@@ -0,0 +1,14 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Tauri + React + Typescript</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "tauri-app",
|
||||
"private": true,
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
"preview": "vite preview",
|
||||
"tauri": "tauri"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"@tauri-apps/api": "^2",
|
||||
"@tauri-apps/plugin-opener": "^2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.1.8",
|
||||
"@types/react-dom": "^19.1.6",
|
||||
"@vitejs/plugin-react": "^4.6.0",
|
||||
"typescript": "~5.8.3",
|
||||
"vite": "^7.0.4",
|
||||
"@tauri-apps/cli": "^2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<svg width="206" height="231" viewBox="0 0 206 231" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M143.143 84C143.143 96.1503 133.293 106 121.143 106C108.992 106 99.1426 96.1503 99.1426 84C99.1426 71.8497 108.992 62 121.143 62C133.293 62 143.143 71.8497 143.143 84Z" fill="#FFC131"/>
|
||||
<ellipse cx="84.1426" cy="147" rx="22" ry="22" transform="rotate(180 84.1426 147)" fill="#24C8DB"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M166.738 154.548C157.86 160.286 148.023 164.269 137.757 166.341C139.858 160.282 141 153.774 141 147C141 144.543 140.85 142.121 140.558 139.743C144.975 138.204 149.215 136.139 153.183 133.575C162.73 127.404 170.292 118.608 174.961 108.244C179.63 97.8797 181.207 86.3876 179.502 75.1487C177.798 63.9098 172.884 53.4021 165.352 44.8883C157.82 36.3744 147.99 30.2165 137.042 27.1546C126.095 24.0926 114.496 24.2568 103.64 27.6274C92.7839 30.998 83.1319 37.4317 75.8437 46.1553C74.9102 47.2727 74.0206 48.4216 73.176 49.5993C61.9292 50.8488 51.0363 54.0318 40.9629 58.9556C44.2417 48.4586 49.5653 38.6591 56.679 30.1442C67.0505 17.7298 80.7861 8.57426 96.2354 3.77762C111.685 -1.01901 128.19 -1.25267 143.769 3.10474C159.348 7.46215 173.337 16.2252 184.056 28.3411C194.775 40.457 201.767 55.4101 204.193 71.404C206.619 87.3978 204.374 103.752 197.73 118.501C191.086 133.25 180.324 145.767 166.738 154.548ZM41.9631 74.275L62.5557 76.8042C63.0459 72.813 63.9401 68.9018 65.2138 65.1274C57.0465 67.0016 49.2088 70.087 41.9631 74.275Z" fill="#FFC131"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M38.4045 76.4519C47.3493 70.6709 57.2677 66.6712 67.6171 64.6132C65.2774 70.9669 64 77.8343 64 85.0001C64 87.1434 64.1143 89.26 64.3371 91.3442C60.0093 92.8732 55.8533 94.9092 51.9599 97.4256C42.4128 103.596 34.8505 112.392 30.1816 122.756C25.5126 133.12 23.9357 144.612 25.6403 155.851C27.3449 167.09 32.2584 177.598 39.7906 186.112C47.3227 194.626 57.153 200.784 68.1003 203.846C79.0476 206.907 90.6462 206.743 101.502 203.373C112.359 200.002 122.011 193.568 129.299 184.845C130.237 183.722 131.131 182.567 131.979 181.383C143.235 180.114 154.132 176.91 164.205 171.962C160.929 182.49 155.596 192.319 148.464 200.856C138.092 213.27 124.357 222.426 108.907 227.222C93.458 232.019 76.9524 232.253 61.3736 227.895C45.7948 223.538 31.8055 214.775 21.0867 202.659C10.3679 190.543 3.37557 175.59 0.949823 159.596C-1.47592 143.602 0.768139 127.248 7.41237 112.499C14.0566 97.7497 24.8183 85.2327 38.4045 76.4519ZM163.062 156.711L163.062 156.711C162.954 156.773 162.846 156.835 162.738 156.897C162.846 156.835 162.954 156.773 163.062 156.711Z" fill="#24C8DB"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,7 @@
|
||||
# Generated by Cargo
|
||||
# will have compiled files and executables
|
||||
/target/
|
||||
|
||||
# Generated by Tauri
|
||||
# will have schema files for capabilities auto-completion
|
||||
/gen/schemas
|
||||
@@ -0,0 +1,25 @@
|
||||
[package]
|
||||
name = "tauri-app"
|
||||
version = "0.1.0"
|
||||
description = "A Tauri App"
|
||||
authors = ["you"]
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[lib]
|
||||
# The `_lib` suffix may seem redundant but it is necessary
|
||||
# to make the lib name unique and wouldn't conflict with the bin name.
|
||||
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
|
||||
name = "tauri_app_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "2", features = [] }
|
||||
tauri-plugin-opener = "2"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
tauri_build::build()
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"$schema": "../gen/schemas/desktop-schema.json",
|
||||
"identifier": "default",
|
||||
"description": "Capability for the main window",
|
||||
"windows": ["main"],
|
||||
"permissions": [
|
||||
"core:default",
|
||||
"opener:default"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
xcuserdata/
|
||||
build/
|
||||
Externals/
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 118 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 10 KiB |
@@ -0,0 +1,116 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "AppIcon-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "AppIcon-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "AppIcon-29x29@2x-1.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "AppIcon-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "AppIcon-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "AppIcon-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "AppIcon-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "AppIcon-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "AppIcon-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "AppIcon-20x20@2x-1.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "AppIcon-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "AppIcon-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "AppIcon-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "AppIcon-40x40@2x-1.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "AppIcon-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "AppIcon-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "AppIcon-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "AppIcon-512@2x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?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>method</key>
|
||||
<string>debugging</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17150" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Y6W-OH-hqX">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17122"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="s0d-6b-0kx">
|
||||
<objects>
|
||||
<viewController id="Y6W-OH-hqX" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -0,0 +1,21 @@
|
||||
# Uncomment the next line to define a global platform for your project
|
||||
|
||||
target 'tauri-app_iOS' do
|
||||
platform :ios, '14.0'
|
||||
# Pods for tauri-app_iOS
|
||||
end
|
||||
|
||||
target 'tauri-app_macOS' do
|
||||
platform :osx, '11.0'
|
||||
# Pods for tauri-app_macOS
|
||||
end
|
||||
|
||||
# Delete the deployment target for iOS and macOS, causing it to be inherited from the Podfile
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
|
||||
config.build_settings.delete 'MACOSX_DEPLOYMENT_TARGET'
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
namespace ffi {
|
||||
extern "C" {
|
||||
void start_app();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#include "bindings/bindings.h"
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
ffi::start_app();
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
name: tauri-app
|
||||
options:
|
||||
bundleIdPrefix: com.megamind.tauri-app
|
||||
deploymentTarget:
|
||||
iOS: 14.0
|
||||
fileGroups: [../../src]
|
||||
configs:
|
||||
debug: debug
|
||||
release: release
|
||||
settingGroups:
|
||||
app:
|
||||
base:
|
||||
PRODUCT_NAME: tauri-app
|
||||
PRODUCT_BUNDLE_IDENTIFIER: com.megamind.tauri-app
|
||||
targetTemplates:
|
||||
app:
|
||||
type: application
|
||||
sources:
|
||||
- path: Sources
|
||||
scheme:
|
||||
environmentVariables:
|
||||
RUST_BACKTRACE: full
|
||||
RUST_LOG: info
|
||||
settings:
|
||||
groups: [app]
|
||||
targets:
|
||||
tauri-app_iOS:
|
||||
type: application
|
||||
platform: iOS
|
||||
sources:
|
||||
- path: Sources
|
||||
- path: Assets.xcassets
|
||||
- path: Externals
|
||||
- path: tauri-app_iOS
|
||||
- path: assets
|
||||
buildPhase: resources
|
||||
type: folder
|
||||
- path: LaunchScreen.storyboard
|
||||
info:
|
||||
path: tauri-app_iOS/Info.plist
|
||||
properties:
|
||||
LSRequiresIPhoneOS: true
|
||||
UILaunchStoryboardName: LaunchScreen
|
||||
UIRequiredDeviceCapabilities: [arm64, metal]
|
||||
UISupportedInterfaceOrientations:
|
||||
- UIInterfaceOrientationPortrait
|
||||
- UIInterfaceOrientationLandscapeLeft
|
||||
- UIInterfaceOrientationLandscapeRight
|
||||
UISupportedInterfaceOrientations~ipad:
|
||||
- UIInterfaceOrientationPortrait
|
||||
- UIInterfaceOrientationPortraitUpsideDown
|
||||
- UIInterfaceOrientationLandscapeLeft
|
||||
- UIInterfaceOrientationLandscapeRight
|
||||
CFBundleShortVersionString: 0.1.0
|
||||
CFBundleVersion: "0.1.0"
|
||||
entitlements:
|
||||
path: tauri-app_iOS/tauri-app_iOS.entitlements
|
||||
scheme:
|
||||
environmentVariables:
|
||||
RUST_BACKTRACE: full
|
||||
RUST_LOG: info
|
||||
settings:
|
||||
base:
|
||||
ENABLE_BITCODE: false
|
||||
ARCHS: [arm64]
|
||||
VALID_ARCHS: arm64
|
||||
LIBRARY_SEARCH_PATHS[arch=x86_64]: $(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||
LIBRARY_SEARCH_PATHS[arch=arm64]: $(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES: true
|
||||
EXCLUDED_ARCHS[sdk=iphoneos*]: x86_64
|
||||
groups: [app]
|
||||
dependencies:
|
||||
- framework: libapp.a
|
||||
embed: false
|
||||
- sdk: CoreGraphics.framework
|
||||
- sdk: Metal.framework
|
||||
- sdk: MetalKit.framework
|
||||
- sdk: QuartzCore.framework
|
||||
- sdk: Security.framework
|
||||
- sdk: UIKit.framework
|
||||
- sdk: WebKit.framework
|
||||
preBuildScripts:
|
||||
- script: npm run -- tauri ios xcode-script -v --platform ${PLATFORM_DISPLAY_NAME:?} --sdk-root ${SDKROOT:?} --framework-search-paths "${FRAMEWORK_SEARCH_PATHS:?}" --header-search-paths "${HEADER_SEARCH_PATHS:?}" --gcc-preprocessor-definitions "${GCC_PREPROCESSOR_DEFINITIONS:-}" --configuration ${CONFIGURATION:?} ${FORCE_COLOR} ${ARCHS:?}
|
||||
name: Build Rust Code
|
||||
basedOnDependencyAnalysis: false
|
||||
outputFiles:
|
||||
- $(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapp.a
|
||||
- $(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapp.a
|
||||
@@ -0,0 +1,458 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 77;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
094A1ECD90ECD007825D95B3 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84E625C1ABDB2D39CB77BF29 /* Security.framework */; };
|
||||
1524BBF419A24C289873FCE0 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA1A066F7EDD869BC014BB9C /* Metal.framework */; };
|
||||
5DCFDCE0989E0655641185BE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BA38F7BF7C28E04DBA849965 /* LaunchScreen.storyboard */; };
|
||||
5DDC8F8949AE56AB4B683F62 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5384EE0C649F19A31B462538 /* QuartzCore.framework */; };
|
||||
6495EEEF2DFC12CB82351B2B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C42C09CE350D0304EDF85C59 /* UIKit.framework */; };
|
||||
7425A66C523CC66EFF87A16E /* libapp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46600E42EDBD4E2F9CFFB94E /* libapp.a */; };
|
||||
74C25A7912AFE30DBE96B590 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = 234C7D371C7B526F7E893B15 /* assets */; };
|
||||
7A50F9841502955D69915755 /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B8DBF813DB5FCB214283D94D /* MetalKit.framework */; };
|
||||
7E5D9DF6134425B5314935DE /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 75C0A66A4769E0B428DFFE16 /* main.mm */; };
|
||||
824033B5A7F94F13A4C63E6E /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CF0F15D9837DA9743995496A /* WebKit.framework */; };
|
||||
8A272DD02B0D36ACBCE73E26 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CFDCAF660F4CA93110C8FB02 /* Assets.xcassets */; };
|
||||
CA00951E60FA3594F396EEEC /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AC56A11F310BBFF30CCFEB63 /* CoreGraphics.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
234C7D371C7B526F7E893B15 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; path = assets; sourceTree = SOURCE_ROOT; };
|
||||
415CE9B61EE711FB11882F1B /* bindings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = bindings.h; sourceTree = "<group>"; };
|
||||
46600E42EDBD4E2F9CFFB94E /* libapp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libapp.a; sourceTree = "<group>"; };
|
||||
5384EE0C649F19A31B462538 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
6B62CCFCDED0CBE851A51E4F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
75C0A66A4769E0B428DFFE16 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
|
||||
7A62F8DA3ACF6DA66CB9785D /* tauri-app_iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "tauri-app_iOS.entitlements"; sourceTree = "<group>"; };
|
||||
84E625C1ABDB2D39CB77BF29 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||
9B11C2C873FB5A7B97B0605A /* tauri-app_iOS.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = "tauri-app_iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
AC56A11F310BBFF30CCFEB63 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
B8DBF813DB5FCB214283D94D /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = System/Library/Frameworks/MetalKit.framework; sourceTree = SDKROOT; };
|
||||
BA38F7BF7C28E04DBA849965 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
C42C09CE350D0304EDF85C59 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
CA1A066F7EDD869BC014BB9C /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
|
||||
CF0F15D9837DA9743995496A /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
|
||||
CFDCAF660F4CA93110C8FB02 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
D96C5A0C6EF1CFC067A1C008 /* main.rs */ = {isa = PBXFileReference; path = main.rs; sourceTree = "<group>"; };
|
||||
E486419C84C58B66E0FC1383 /* lib.rs */ = {isa = PBXFileReference; path = lib.rs; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
6EEA0490763EB982F7701E3D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7425A66C523CC66EFF87A16E /* libapp.a in Frameworks */,
|
||||
CA00951E60FA3594F396EEEC /* CoreGraphics.framework in Frameworks */,
|
||||
1524BBF419A24C289873FCE0 /* Metal.framework in Frameworks */,
|
||||
7A50F9841502955D69915755 /* MetalKit.framework in Frameworks */,
|
||||
5DDC8F8949AE56AB4B683F62 /* QuartzCore.framework in Frameworks */,
|
||||
094A1ECD90ECD007825D95B3 /* Security.framework in Frameworks */,
|
||||
6495EEEF2DFC12CB82351B2B /* UIKit.framework in Frameworks */,
|
||||
824033B5A7F94F13A4C63E6E /* WebKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
2ECFA35AFF2D5945783C3B8D /* Externals */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = Externals;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4261FD71066ABB203F1B3741 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B11C2C873FB5A7B97B0605A /* tauri-app_iOS.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
48DF3F622809E7EBA4ED342A /* src */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E486419C84C58B66E0FC1383 /* lib.rs */,
|
||||
D96C5A0C6EF1CFC067A1C008 /* main.rs */,
|
||||
);
|
||||
name = src;
|
||||
path = ../../src;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5FCA5E244F4BE4C93672F978 /* bindings */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
415CE9B61EE711FB11882F1B /* bindings.h */,
|
||||
);
|
||||
path = bindings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
86E4D2974D6FC803E43026BD /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AC56A11F310BBFF30CCFEB63 /* CoreGraphics.framework */,
|
||||
46600E42EDBD4E2F9CFFB94E /* libapp.a */,
|
||||
CA1A066F7EDD869BC014BB9C /* Metal.framework */,
|
||||
B8DBF813DB5FCB214283D94D /* MetalKit.framework */,
|
||||
5384EE0C649F19A31B462538 /* QuartzCore.framework */,
|
||||
84E625C1ABDB2D39CB77BF29 /* Security.framework */,
|
||||
C42C09CE350D0304EDF85C59 /* UIKit.framework */,
|
||||
CF0F15D9837DA9743995496A /* WebKit.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
90B7B06659AD5A7A7EE39662 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9A6A58EE8A3E239B0E7BDD81 /* tauri-app */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9A6A58EE8A3E239B0E7BDD81 /* tauri-app */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
75C0A66A4769E0B428DFFE16 /* main.mm */,
|
||||
5FCA5E244F4BE4C93672F978 /* bindings */,
|
||||
);
|
||||
path = "tauri-app";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A17B869C1C261C5F8DF765C9 /* tauri-app_iOS */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6B62CCFCDED0CBE851A51E4F /* Info.plist */,
|
||||
7A62F8DA3ACF6DA66CB9785D /* tauri-app_iOS.entitlements */,
|
||||
);
|
||||
path = "tauri-app_iOS";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E8C7C60131D2B902F3255A8F = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
234C7D371C7B526F7E893B15 /* assets */,
|
||||
CFDCAF660F4CA93110C8FB02 /* Assets.xcassets */,
|
||||
BA38F7BF7C28E04DBA849965 /* LaunchScreen.storyboard */,
|
||||
2ECFA35AFF2D5945783C3B8D /* Externals */,
|
||||
90B7B06659AD5A7A7EE39662 /* Sources */,
|
||||
48DF3F622809E7EBA4ED342A /* src */,
|
||||
A17B869C1C261C5F8DF765C9 /* tauri-app_iOS */,
|
||||
86E4D2974D6FC803E43026BD /* Frameworks */,
|
||||
4261FD71066ABB203F1B3741 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
067C19C8047A2326EE93616E /* tauri-app_iOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 492FB4942D220065AF299C12 /* Build configuration list for PBXNativeTarget "tauri-app_iOS" */;
|
||||
buildPhases = (
|
||||
4CFF21EFA1FFE4D2AB9D6998 /* Build Rust Code */,
|
||||
D8D571D7BDCA1ABF2E0CB9D6 /* Sources */,
|
||||
A4D85C1726744E26D8F01FD3 /* Resources */,
|
||||
6EEA0490763EB982F7701E3D /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "tauri-app_iOS";
|
||||
packageProductDependencies = (
|
||||
);
|
||||
productName = "tauri-app_iOS";
|
||||
productReference = 9B11C2C873FB5A7B97B0605A /* tauri-app_iOS.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
90D4CFD39CFBBAA5E9883AD5 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastUpgradeCheck = 1430;
|
||||
};
|
||||
buildConfigurationList = 15AD1887792B155C6905ADD6 /* Build configuration list for PBXProject "tauri-app" */;
|
||||
compatibilityVersion = "Xcode 14.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
Base,
|
||||
en,
|
||||
);
|
||||
mainGroup = E8C7C60131D2B902F3255A8F;
|
||||
minimizedProjectReferenceProxies = 1;
|
||||
preferredProjectObjectVersion = 77;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
067C19C8047A2326EE93616E /* tauri-app_iOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
A4D85C1726744E26D8F01FD3 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8A272DD02B0D36ACBCE73E26 /* Assets.xcassets in Resources */,
|
||||
5DCFDCE0989E0655641185BE /* LaunchScreen.storyboard in Resources */,
|
||||
74C25A7912AFE30DBE96B590 /* assets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
4CFF21EFA1FFE4D2AB9D6998 /* Build Rust Code */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Build Rust Code";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapp.a",
|
||||
"$(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapp.a",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "npm run -- tauri ios xcode-script -v --platform ${PLATFORM_DISPLAY_NAME:?} --sdk-root ${SDKROOT:?} --framework-search-paths \"${FRAMEWORK_SEARCH_PATHS:?}\" --header-search-paths \"${HEADER_SEARCH_PATHS:?}\" --gcc-preprocessor-definitions \"${GCC_PREPROCESSOR_DEFINITIONS:-}\" --configuration ${CONFIGURATION:?} ${FORCE_COLOR} ${ARCHS:?}";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D8D571D7BDCA1ABF2E0CB9D6 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7E5D9DF6134425B5314935DE /* main.mm in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
421E0640619ED5B0C0B13B4E /* debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ARCHS = (
|
||||
arm64,
|
||||
);
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = "tauri-app_iOS/tauri-app_iOS.entitlements";
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
ENABLE_BITCODE = NO;
|
||||
"EXCLUDED_ARCHS[sdk=iphoneos*]" = x86_64;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\".\"",
|
||||
);
|
||||
INFOPLIST_FILE = "tauri-app_iOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64]" = "$(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = "$(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.megamind.tauri-app";
|
||||
PRODUCT_NAME = "tauri-app";
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALID_ARCHS = arm64;
|
||||
};
|
||||
name = debug;
|
||||
};
|
||||
62330632B84ED41E941EFCF6 /* release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = release;
|
||||
};
|
||||
62D98D8CE88586901FBBF6C0 /* debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(inherited)",
|
||||
"DEBUG=1",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = debug;
|
||||
};
|
||||
D2A4FF1B078298AC78D0EBD3 /* release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ARCHS = (
|
||||
arm64,
|
||||
);
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = "tauri-app_iOS/tauri-app_iOS.entitlements";
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
ENABLE_BITCODE = NO;
|
||||
"EXCLUDED_ARCHS[sdk=iphoneos*]" = x86_64;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\".\"",
|
||||
);
|
||||
INFOPLIST_FILE = "tauri-app_iOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64]" = "$(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = "$(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.megamind.tauri-app";
|
||||
PRODUCT_NAME = "tauri-app";
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALID_ARCHS = arm64;
|
||||
};
|
||||
name = release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
15AD1887792B155C6905ADD6 /* Build configuration list for PBXProject "tauri-app" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
62D98D8CE88586901FBBF6C0 /* debug */,
|
||||
62330632B84ED41E941EFCF6 /* release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = debug;
|
||||
};
|
||||
492FB4942D220065AF299C12 /* Build configuration list for PBXNativeTarget "tauri-app_iOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
421E0640619ED5B0C0B13B4E /* debug */,
|
||||
D2A4FF1B078298AC78D0EBD3 /* release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = debug;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 90D4CFD39CFBBAA5E9883AD5 /* Project object */;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?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>BuildSystemType</key>
|
||||
<string>Original</string>
|
||||
<key>DisableBuildSystemDeprecationDiagnostic</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1430"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES"
|
||||
runPostActionsOnFailure = "NO">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "067C19C8047A2326EE93616E"
|
||||
BuildableName = "tauri-app_iOS.app"
|
||||
BlueprintName = "tauri-app_iOS"
|
||||
ReferencedContainer = "container:tauri-app.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "NO"
|
||||
onlyGenerateCoverageForSpecifiedTargets = "NO">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "067C19C8047A2326EE93616E"
|
||||
BuildableName = "tauri-app_iOS.app"
|
||||
BlueprintName = "tauri-app_iOS"
|
||||
ReferencedContainer = "container:tauri-app.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
</Testables>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "RUST_BACKTRACE"
|
||||
value = "full"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
<EnvironmentVariable
|
||||
key = "RUST_LOG"
|
||||
value = "info"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "067C19C8047A2326EE93616E"
|
||||
BuildableName = "tauri-app_iOS.app"
|
||||
BlueprintName = "tauri-app_iOS"
|
||||
ReferencedContainer = "container:tauri-app.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "RUST_BACKTRACE"
|
||||
value = "full"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
<EnvironmentVariable
|
||||
key = "RUST_LOG"
|
||||
value = "info"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "release"
|
||||
shouldUseLaunchSchemeArgsEnv = "NO"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "067C19C8047A2326EE93616E"
|
||||
BuildableName = "tauri-app_iOS.app"
|
||||
BlueprintName = "tauri-app_iOS"
|
||||
ReferencedContainer = "container:tauri-app.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "RUST_BACKTRACE"
|
||||
value = "full"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
<EnvironmentVariable
|
||||
key = "RUST_LOG"
|
||||
value = "info"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?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>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>metal</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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/>
|
||||
</plist>
|
||||
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 974 B |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 903 B |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,14 @@
|
||||
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||
#[tauri::command]
|
||||
fn greet(name: &str) -> String {
|
||||
format!("Hello, {}! You've been greeted from Rust!", name)
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.invoke_handler(tauri::generate_handler![greet])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
fn main() {
|
||||
tauri_app_lib::run()
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "tauri-app",
|
||||
"version": "0.1.0",
|
||||
"identifier": "com.megamind.tauri-app",
|
||||
"build": {
|
||||
"beforeDevCommand": "npm run dev",
|
||||
"devUrl": "http://localhost:1420",
|
||||
"beforeBuildCommand": "npm run build",
|
||||
"frontendDist": "../dist"
|
||||
},
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"title": "tauri-app",
|
||||
"width": 800,
|
||||
"height": 600
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
"csp": null
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
.logo.vite:hover {
|
||||
filter: drop-shadow(0 0 2em #747bff);
|
||||
}
|
||||
|
||||
.logo.react:hover {
|
||||
filter: drop-shadow(0 0 2em #61dafb);
|
||||
}
|
||||
:root {
|
||||
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
font-weight: 400;
|
||||
|
||||
color: #0f0f0f;
|
||||
background-color: #f6f6f6;
|
||||
|
||||
font-synthesis: none;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
.container {
|
||||
margin: 0;
|
||||
padding-top: 10vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 6em;
|
||||
padding: 1.5em;
|
||||
will-change: filter;
|
||||
transition: 0.75s;
|
||||
}
|
||||
|
||||
.logo.tauri:hover {
|
||||
filter: drop-shadow(0 0 2em #24c8db);
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
a {
|
||||
font-weight: 500;
|
||||
color: #646cff;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #535bf2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
input,
|
||||
button {
|
||||
border-radius: 8px;
|
||||
border: 1px solid transparent;
|
||||
padding: 0.6em 1.2em;
|
||||
font-size: 1em;
|
||||
font-weight: 500;
|
||||
font-family: inherit;
|
||||
color: #0f0f0f;
|
||||
background-color: #ffffff;
|
||||
transition: border-color 0.25s;
|
||||
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
border-color: #396cd8;
|
||||
}
|
||||
button:active {
|
||||
border-color: #396cd8;
|
||||
background-color: #e8e8e8;
|
||||
}
|
||||
|
||||
input,
|
||||
button {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#greet-input {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
color: #f6f6f6;
|
||||
background-color: #2f2f2f;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #24c8db;
|
||||
}
|
||||
|
||||
input,
|
||||
button {
|
||||
color: #ffffff;
|
||||
background-color: #0f0f0f98;
|
||||
}
|
||||
button:active {
|
||||
background-color: #0f0f0f69;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import { useState } from "react";
|
||||
import reactLogo from "./assets/react.svg";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import "./App.css";
|
||||
|
||||
function App() {
|
||||
const [greetMsg, setGreetMsg] = useState("");
|
||||
const [name, setName] = useState("");
|
||||
|
||||
async function greet() {
|
||||
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||
setGreetMsg(await invoke("greet", { name }));
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="container">
|
||||
<h1>Welcome to Tauri + React</h1>
|
||||
|
||||
<div className="row">
|
||||
<a href="https://vite.dev" target="_blank">
|
||||
<img src="/vite.svg" className="logo vite" alt="Vite logo" />
|
||||
</a>
|
||||
<a href="https://tauri.app" target="_blank">
|
||||
<img src="/tauri.svg" className="logo tauri" alt="Tauri logo" />
|
||||
</a>
|
||||
<a href="https://react.dev" target="_blank">
|
||||
<img src={reactLogo} className="logo react" alt="React logo" />
|
||||
</a>
|
||||
</div>
|
||||
<p>Click on the Tauri, Vite, and React logos to learn more.</p>
|
||||
|
||||
<form
|
||||
className="row"
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
greet();
|
||||
}}
|
||||
>
|
||||
<input
|
||||
id="greet-input"
|
||||
onChange={(e) => setName(e.currentTarget.value)}
|
||||
placeholder="Enter a name..."
|
||||
/>
|
||||
<button type="submit">Greet</button>
|
||||
</form>
|
||||
<p>{greetMsg}</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
@@ -0,0 +1,9 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import App from "./App";
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
);
|
||||
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"references": [{ "path": "./tsconfig.node.json" }]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"skipLibCheck": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
// @ts-expect-error process is a nodejs global
|
||||
const host = process.env.TAURI_DEV_HOST;
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig(async () => ({
|
||||
plugins: [react()],
|
||||
|
||||
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
||||
//
|
||||
// 1. prevent Vite from obscuring rust errors
|
||||
clearScreen: false,
|
||||
// 2. tauri expects a fixed port, fail if that port is not available
|
||||
server: {
|
||||
port: 1420,
|
||||
strictPort: true,
|
||||
host: host || false,
|
||||
hmr: host
|
||||
? {
|
||||
protocol: "ws",
|
||||
host,
|
||||
port: 1421,
|
||||
}
|
||||
: undefined,
|
||||
watch: {
|
||||
// 3. tell Vite to ignore watching `src-tauri`
|
||||
ignored: ["**/src-tauri/**"],
|
||||
},
|
||||
},
|
||||
}));
|
||||