Thomas Pedot
mardi 7 avril 2026
Tauri v2 + Vite: Building a GitLab Client with Rust, TypeScript, and Push Events

GitAlchemy runs on a Rust backend with a React/TypeScript frontend, built on Tauri v2 and bundled with Vite. This article covers the integration benefits, how push events from GitLab are displayed in the app, and the F-Droid distribution setup.
Why Tauri + Vite
The traditional mobile development path — React Native or Flutter — means writing two codebases for Android and iOS. Tauri v2 changes this: one Rust codebase, one TypeScript frontend, four platforms (Linux, macOS, Windows, Android).
Vite pairs naturally with Tauri:
1// package.json
2{
3 "scripts": {
4 "dev": "vite",
5 "build": "tsc && vite build",
6 "preview": "vite preview",
7 "tauri": "tauri"
8 }
9}During development, vite serves the frontend at localhost:5173 while tauri dev runs the Rust backend and opens the app window. Changes to TypeScript files hot-reload instantly — no recompilation of the Rust binary. This is dramatically faster than the old Tauri v1 + webpack setup.
The build process is equally clean: vite build produces static assets, tauri build packages them into the native binary. No webpack configuration, no custom bundler plugins.
Rust + TypeScript: The IPC Layer
GitAlchemy uses tauri-specta to generate TypeScript bindings from Rust command signatures:
1#[tauri::command]
2async fn get_merge_request(
3 project: String,
4 mr_iid: i32,
5 state: State<'_, AppState>,
6) -> Result<MergeRequest, String> {
7 state
8 .gitlab
9 .get(&format!("projects/{}/merge_requests/{}", project, mr_iid))
10 .await
11 .map_err(|e| e.to_string())
12}This command becomes a typed TypeScript function:
1import { invoke } from "@tauri-apps/api/core";
2
3const mr = await invoke<MergeRequest>("get_merge_request", {
4 project: "mygroup/myproject",
5 mr_iid: 42,
6});The MergeRequest type is auto-generated — no manual type writing, no drift between Rust and TypeScript. When the Rust signature changes, TypeScript compilation fails until the frontend is updated. This is exactly what you want: compile-time guarantees that your frontend calls match the backend.
For the full architecture, see the main GitAlchemy build article.
Push Events in GitLab
GitLab tracks events in an activity feed — pushes, merges, issue updates, comments. For a GitLab client, showing push events is essential: developers want to know when code lands in their projects.
GitLab's events API returns:
1{
2 "action_name": "pushed",
3 "target_type": "Push",
4 "author": {
5 "name": "John Doe",
6 "avatar_url": "https://gitlab.com/avatar.jpg"
7 },
8 "created_at": "2026-05-08T14:30:00Z",
9 "push_data": {
10 "commit_title": "feat: add background polling",
11 "commit_count": 3,
12 "ref_type": "branch",
13 "ref": "main"
14 }
15}GitAlchemy displays push events in the MR detail view under an "Events" tab:
1function MergeRequestEvents({ events }: { events: Event[] }) {
2 const pushEvents = events.filter(e => e.action_name === "pushed");
3
4 return (
5 <div className="space-y-3">
6 {pushEvents.map(event => (
7 <EventCard
8 key={event.id}
9 avatar={event.author.avatar_url}
10 title={event.push_data.commit_title}
11 subtitle={`${event.push_data.commit_count} commit(s) to ${event.push_data.ref}`}
12 timestamp={event.created_at}
13 />
14 ))}
15 </div>
16 );
17}The UI shows who pushed, how many commits, and which branch — essential context for code review on mobile.
F-Droid Distribution
GitAlchemy is available on F-Droid: https://f-droid.org/packages/com.thomas.pedot.gitlalchemy/
F-Droid requires:
- Signed APK — built with
tauri build --debugor release mode - Metadata file — describes the app, version, and update check URL
- Reproducible builds — F-Droid verifies the build matches source
The metadata in fdroid/metadata/com.thomas.pedot.gitlalchemy.yml:
1Categories:
2 - Development
3 - Git
4License: Proprietary
5Summary: Native GitLab client for Android
6Description: |
7 GitAlchemy is a native GitLab client for Android and iOS.
8 Manage projects, issues, merge requests, and todos from your mobile device.F-Droid's update check points to GitLab's release artifacts — when a new version is tagged, F-Droid automatically picks it up and notifies users.
Unlike Google Play, F-Droid has no review queue — updates appear within hours. The trade-off is no in-app billing (F-Droid is donation-supported only).
Summary
Tauri v2 + Vite provides a fast dev loop and clean build process. The Rust/TypeScript IPC via tauri-specta ensures type safety across the boundary. Push events from GitLab are displayed in the MR detail view. And F-Droid distribution reaches users who prefer open-source app stores.
This setup — one codebase, four platforms, reliable background sync via WorkManager — is the foundation GitAlchemy runs on.
Related Articles
- WorkManager Background Tasks on Android — Background polling implementation
- TipTap Mobile Editor — Rich text editing on mobile
- Raycast Design System — The UI foundation
- Tauri React TypeScript Production App — Core architecture deep dive
- Tauri Android F-Droid Distribution — Mobile distribution