Skip to content

Commit cd7c9c5

Browse files
committed
v3.0.0-rs: Complete backend rewrite from Go/Wails to Rust/Tauri
BREAKING CHANGES: - Complete backend rewrite from Go + Wails v2 to Rust + Tauri v2 - Build system changed from Wails CLI to Cargo + Tauri CLI Performance Improvements: - Memory usage reduced from ~10MB to ~4MB at runtime - Zero garbage collection overhead (Rust has no GC) - Native system WebView (no bundled Chromium) - Faster app startup and response times Technical Stack: - Backend: Rust with Tauri v2 - Frontend: Svelte 3 + TailwindCSS (unchanged) - IPC: Tauri command system with serde serialization - Async: Tokio runtime for non-blocking operations - Build: LTO optimization, strip symbols, single codegen unit Backend (Rust): - All Go code rewritten to idiomatic Rust - Async/await with Tokio for file operations - Strong type safety with serde serialization - Error handling with thiserror crate - Process management via sysinfo crate - File dialogs via rfd crate - ZIP operations via zip crate UI Changes: - Reset tab: Folder button moved next to Data Path - Copy path button on the left, Folder button on the right - Action buttons grid now 2 columns Migration Notes: - All user data remains compatible (same paths) - App configs: ~/.surfmanager/AppConfigs/ - Backups: Documents/SurfManager/backup/ - No migration required - just install and run
0 parents  commit cd7c9c5

71 files changed

Lines changed: 14708 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
name: Build SurfManager
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
inputs:
9+
platform:
10+
description: 'Target Platform'
11+
required: true
12+
default: 'all'
13+
type: choice
14+
options:
15+
- all
16+
- windows
17+
- linux
18+
- macos
19+
20+
jobs:
21+
build:
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
- os: windows-latest
27+
target: x86_64-pc-windows-msvc
28+
name: windows
29+
- os: ubuntu-22.04
30+
target: x86_64-unknown-linux-gnu
31+
name: linux
32+
- os: macos-latest
33+
target: x86_64-apple-darwin
34+
name: macos-intel
35+
- os: macos-latest
36+
target: aarch64-apple-darwin
37+
name: macos-arm
38+
39+
runs-on: ${{ matrix.os }}
40+
41+
steps:
42+
- name: Check platform filter
43+
id: filter
44+
shell: bash
45+
run: |
46+
if [[ "${{ github.event_name }}" == "push" ]]; then
47+
echo "skip=false" >> $GITHUB_OUTPUT
48+
elif [[ "${{ github.event.inputs.platform }}" == "all" ]]; then
49+
echo "skip=false" >> $GITHUB_OUTPUT
50+
elif [[ "${{ github.event.inputs.platform }}" == "windows" && "${{ matrix.name }}" == "windows" ]]; then
51+
echo "skip=false" >> $GITHUB_OUTPUT
52+
elif [[ "${{ github.event.inputs.platform }}" == "linux" && "${{ matrix.name }}" == "linux" ]]; then
53+
echo "skip=false" >> $GITHUB_OUTPUT
54+
elif [[ "${{ github.event.inputs.platform }}" == "macos" && "${{ matrix.name }}" == macos-* ]]; then
55+
echo "skip=false" >> $GITHUB_OUTPUT
56+
else
57+
echo "skip=true" >> $GITHUB_OUTPUT
58+
fi
59+
60+
- name: Checkout
61+
if: steps.filter.outputs.skip == 'false'
62+
uses: actions/checkout@v4
63+
64+
- name: Setup Rust
65+
if: steps.filter.outputs.skip == 'false'
66+
uses: dtolnay/rust-action@stable
67+
with:
68+
targets: ${{ matrix.target }}
69+
70+
- name: Setup Node.js
71+
if: steps.filter.outputs.skip == 'false'
72+
uses: actions/setup-node@v4
73+
with:
74+
node-version: '20'
75+
76+
- name: Install Linux Dependencies
77+
if: steps.filter.outputs.skip == 'false' && matrix.name == 'linux'
78+
run: |
79+
sudo apt-get update
80+
sudo apt-get install -y libwebkit2gtk-4.1-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
81+
82+
- name: Install Tauri CLI
83+
if: steps.filter.outputs.skip == 'false'
84+
run: cargo install tauri-cli
85+
86+
- name: Install Frontend Dependencies
87+
if: steps.filter.outputs.skip == 'false'
88+
run: |
89+
cd frontend
90+
npm install
91+
92+
- name: Build (Windows)
93+
if: steps.filter.outputs.skip == 'false' && matrix.name == 'windows'
94+
run: cargo tauri build --target ${{ matrix.target }}
95+
96+
- name: Build (Linux)
97+
if: steps.filter.outputs.skip == 'false' && matrix.name == 'linux'
98+
run: cargo tauri build --target ${{ matrix.target }}
99+
100+
- name: Build (macOS Intel)
101+
if: steps.filter.outputs.skip == 'false' && matrix.name == 'macos-intel'
102+
run: cargo tauri build --target ${{ matrix.target }}
103+
104+
- name: Build (macOS ARM)
105+
if: steps.filter.outputs.skip == 'false' && matrix.name == 'macos-arm'
106+
run: cargo tauri build --target ${{ matrix.target }}
107+
108+
- name: Upload Artifact (Windows)
109+
if: steps.filter.outputs.skip == 'false' && matrix.name == 'windows'
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: SurfManager-windows
113+
path: |
114+
src-tauri/target/${{ matrix.target }}/release/bundle/msi/*.msi
115+
src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*.exe
116+
117+
- name: Upload Artifact (Linux)
118+
if: steps.filter.outputs.skip == 'false' && matrix.name == 'linux'
119+
uses: actions/upload-artifact@v4
120+
with:
121+
name: SurfManager-linux
122+
path: |
123+
src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb
124+
src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage
125+
126+
- name: Upload Artifact (macOS Intel)
127+
if: steps.filter.outputs.skip == 'false' && matrix.name == 'macos-intel'
128+
uses: actions/upload-artifact@v4
129+
with:
130+
name: SurfManager-macos-intel
131+
path: src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg
132+
133+
- name: Upload Artifact (macOS ARM)
134+
if: steps.filter.outputs.skip == 'false' && matrix.name == 'macos-arm'
135+
uses: actions/upload-artifact@v4
136+
with:
137+
name: SurfManager-macos-arm
138+
path: src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg
139+
140+
release:
141+
needs: build
142+
runs-on: ubuntu-latest
143+
if: startsWith(github.ref, 'refs/tags/')
144+
145+
steps:
146+
- name: Download all artifacts
147+
uses: actions/download-artifact@v4
148+
with:
149+
path: artifacts
150+
151+
- name: Display structure
152+
run: ls -R artifacts
153+
154+
- name: Create Release
155+
uses: softprops/action-gh-release@v1
156+
with:
157+
files: artifacts/**/*
158+
generate_release_notes: true
159+
env:
160+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Rust/Tauri
2+
src-tauri/target/
3+
Cargo.lock
4+
5+
# Node
6+
node_modules/
7+
frontend/dist/
8+
9+
# Build artifacts
10+
build/bin/
11+
12+
# Kiro specs (internal development docs)
13+
.kiro/
14+
15+
# IDE
16+
.vscode/
17+
.idea/
18+
19+
# OS
20+
.DS_Store
21+
Thumbs.db

0 commit comments

Comments
 (0)