-
Notifications
You must be signed in to change notification settings - Fork 0
228 lines (182 loc) · 8.46 KB
/
Copy pathbuild.yml
File metadata and controls
228 lines (182 loc) · 8.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
name: Build & Release InputSync
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
create_release:
description: 'Create GitHub Release'
type: boolean
default: false
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
# ── Linux binary ─────────────────────────────────────────────────────────────
build-linux:
name: Linux x86_64 (native binary)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y \
libgtk-3-dev \
libayatana-appindicator3-dev \
libx11-dev libxtst-dev libxi-dev \
libxdo-dev libxkbcommon-dev \
libwayland-dev \
libglib2.0-dev \
build-essential curl wget file \
libssl-dev patchelf \
cmake nasm
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-gnu
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: Build Linux release binary
working-directory: src-tauri
run: cargo build --release
- name: Package binary
working-directory: src-tauri/target/release
run: |
mkdir -p pkg
cp inputsync pkg/inputsync-linux-x86_64
sha256sum inputsync-linux-x86_64 > pkg/SHA256SUMS-linux.txt
cat pkg/SHA256SUMS-linux.txt
- name: Upload Linux artifact
uses: actions/upload-artifact@v4
with:
name: linux-binary
path: src-tauri/target/release/pkg/
if-no-files-found: error
# ── Windows binary ────────────────────────────────────────────────────────────
build-windows:
name: Windows x86_64 (.exe)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: Build Windows release binary
working-directory: src-tauri
run: cargo build --release
- name: Package binary and compute checksum
shell: pwsh
working-directory: src-tauri/target/release
run: |
Copy-Item inputsync.exe inputsync-windows-x86_64.exe
Get-FileHash inputsync-windows-x86_64.exe -Algorithm SHA256 | `
ForEach-Object { "$($_.Hash) inputsync-windows-x86_64.exe" } | `
Out-File -FilePath "SHA256SUMS-windows.txt"
Get-Content SHA256SUMS-windows.txt
- name: Upload Windows artifact
uses: actions/upload-artifact@v4
with:
name: windows-exe
path: |
src-tauri/target/release/inputsync-windows-x86_64.exe
src-tauri/target/release/SHA256SUMS-windows.txt
if-no-files-found: error
# ── GitHub Release ─────────────────────────────────────────────────────────────
release:
name: Publish GitHub Release
needs: [build-linux, build-windows]
runs-on: ubuntu-latest
if: (startsWith(github.ref, 'refs/tags/') || github.event.inputs.create_release == 'true') && always() && (needs.build-windows.result == 'success' || needs.build-linux.result == 'success')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download Linux artifact
uses: actions/download-artifact@v4
if: needs.build-linux.result == 'success'
with:
name: linux-binary
path: release-assets/linux
- name: Download Windows artifact
uses: actions/download-artifact@v4
if: needs.build-windows.result == 'success'
with:
name: windows-exe
path: release-assets/windows
- name: List release assets
run: find release-assets -type f | sort
- name: Publish release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: "InputSync ${{ github.ref_name }} — Native Rust KVM Switch"
draft: false
prerelease: false
files: |
release-assets/linux/inputsync-linux-x86_64
release-assets/linux/SHA256SUMS-linux.txt
release-assets/windows/inputsync-windows-x86_64.exe
release-assets/windows/SHA256SUMS-windows.txt
body: |
## InputSync ${{ github.ref_name }} — Native Rust KVM Switch
Control multiple computers with one keyboard and mouse over your local network — end-to-end encrypted, no browser engine, no installer, no runtime dependencies.
**Pure Rust + egui. Single portable binary. ~9 MB.**
---
### What's New in ${{ github.ref_name }}
**Architecture — Full migration from Tauri/WebView2/React to pure Rust + egui:**
- Replaced the entire Tauri + React frontend with a native egui (eframe 0.31 + glow) UI — no browser engine, no WebView2, no Node.js required at build or runtime
- Single portable native binary (~9 MB stripped) replaces the old .deb/.exe installer packages
- Windows no longer requires WebView2 Runtime — completely self-contained executable
**New features:**
- Screen edge switching — move the cursor to any configured screen edge to automatically forward control to the connected client
- Dead corners — configurable corner regions that block edge triggers to prevent accidental switching
- Dead zones — configurable rectangular screen regions that suppress edge activation
- Optional TLS transport — self-signed TOFU certificate via rcgen + rustls + tokio-rustls, layered on top of the existing ChaCha20 session encryption
- Settings persistence — all configuration saved to `~/.local/share/inputsync/config.json`
- In-app log viewer — real-time log output in the Logs tab
- Mini screen-map widget — clickable widget in Settings for configuring edge targets
- Tabs: Main | Settings | Logs
**Bug fixes:**
- Server restart after stop — `Start Server` now auto-stops any running server; no stale state
- Stopped TCP listener now releases port immediately on shutdown
---
### Downloads
| Platform | File | Notes |
|----------|------|-------|
| **Linux** (x86_64) | `inputsync-linux-x86_64` | Run directly — no install needed |
| **Windows** (10/11 x64) | `inputsync-windows-x86_64.exe` | Run directly — no installer, no WebView2 |
Checksums: `SHA256SUMS-linux.txt` / `SHA256SUMS-windows.txt`
---
### Quick Start
1. **Server (keyboard/mouse machine):** Run InputSync → Start Server → note the 6-character code + IP
2. **Client (machine to control):** Run InputSync → Enter code + IP → Connect
3. **Switch control:** Move cursor to a configured screen edge, or press **ScrollLock**, or click the Forwarding toggle
4. All input events are encrypted end-to-end (X25519 ECDH + ChaCha20-Poly1305)
---
### System Requirements
**Linux:** `libx11`, `libxtst`, `libxdo`, `libwayland` (most distros include these)
**Windows:** Windows 10+ x64 — no additional runtime required
**Network:** TCP :24800 + UDP :24801-24802 open on the server machine
---
### Verify Downloads
```bash
# Linux
sha256sum -c SHA256SUMS-linux.txt
chmod +x inputsync-linux-x86_64 && ./inputsync-linux-x86_64
# Windows (PowerShell)
Get-FileHash inputsync-windows-x86_64.exe -Algorithm SHA256
# Compare against SHA256SUMS-windows.txt
```
---
*Built with Rust + egui — no WebView2, no Electron, no Node.js*