Skip to content
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
88877ec
Add initial Tauri v2 support
haslinghuis Mar 11, 2025
48c2b5a
Add native tauri check
haslinghuis Mar 12, 2025
42aeeec
Add Tauri v2 shell:allow-open capability
haslinghuis Sep 5, 2025
acd61f4
Update
haslinghuis Oct 23, 2025
84ede3c
Add DockerFile (needs testing)
haslinghuis Oct 23, 2025
4902890
Update edition
haslinghuis Oct 23, 2025
f151b51
Update DOCKER.MD
haslinghuis Oct 24, 2025
0054921
Fix app security capabilities
haslinghuis Oct 24, 2025
a3306b8
Fix outdated versions
haslinghuis Oct 24, 2025
03cac08
Fix shell open
haslinghuis Oct 24, 2025
c92fa42
Add android commands
haslinghuis Oct 24, 2025
4853c58
Use yarn for docker
haslinghuis Oct 24, 2025
d77ffcd
Use cargo
haslinghuis Oct 24, 2025
7522fcd
Fix yarn tauri:android:dev
haslinghuis Oct 24, 2025
35c46eb
isTauri does not work with Android
haslinghuis Oct 24, 2025
a101a60
Update path for ADB
haslinghuis Oct 24, 2025
7f512d1
Use run-script-os
haslinghuis Oct 24, 2025
387e73e
Fix HMR on android
haslinghuis Oct 24, 2025
2405e8c
Remove redundant alias
haslinghuis Oct 24, 2025
f9d0229
Avoid device offline races
haslinghuis Oct 24, 2025
e5cbca7
👾
haslinghuis Oct 24, 2025
9b4b089
add equivalent boot completion check to Windows version
haslinghuis Oct 24, 2025
033ed2d
Fix sonar
haslinghuis Oct 24, 2025
f11154a
Nitpicks
haslinghuis Oct 24, 2025
456d03b
Added support for tauriserial
haslinghuis Oct 25, 2025
0fa4034
Added support for tauriserial II
haslinghuis Oct 25, 2025
a34720e
Update DOCKER.md
haslinghuis Oct 25, 2025
7a0c83a
Update
haslinghuis Oct 25, 2025
b202a7a
Fix broken pipe, reconnect, unplug
haslinghuis Oct 25, 2025
8f425c3
Fix some sonar issues
haslinghuis Oct 25, 2025
3fda9fe
Coderabbit refactoring
haslinghuis Oct 25, 2025
78b8c8e
Use function not object
haslinghuis Oct 25, 2025
6b83cb1
Fix race condition
haslinghuis Oct 25, 2025
7d8e682
Remove deadcode after refactoring
haslinghuis Oct 25, 2025
3203205
Fix some more sonar issues but not all
haslinghuis Oct 25, 2025
794e516
cargo update
haslinghuis Oct 25, 2025
219fb67
ci: simplify to node-only, add workflow_dispatch test wrapper
haslinghuis Oct 25, 2025
73ebf07
release: add Tauri desktop builds (dmg/nsis/deb/appimage) and optiona…
haslinghuis Oct 25, 2025
8cc5564
release: always build Android APK; setup Android SDK and cache Gradle…
haslinghuis Oct 25, 2025
2b37847
ci: run on pull_request and push; upload web-dist artifact to PR; gua…
haslinghuis Oct 25, 2025
b2ec264
ci: add Tauri Linux preview job to build and upload .deb/.AppImage on…
haslinghuis Oct 25, 2025
65ea802
ci: fix Tauri Linux preview by installing required Linux deps (webkit…
haslinghuis Oct 25, 2025
beaa32d
CI: fix Tauri Linux preview by building web assets and set correct CW…
haslinghuis Oct 25, 2025
09c745e
Fix tauri.conf.json schema error: remove unsupported *Cwd keys; run w…
haslinghuis Oct 25, 2025
1e47dde
CI: run Tauri before* commands at repo root (remove `cd ..`) to fix p…
haslinghuis Oct 25, 2025
6001931
Rust
haslinghuis Oct 25, 2025
f29dc9e
CI+Tauri: point frontendDist to ../src/dist and upload correct web ar…
haslinghuis Oct 25, 2025
48c5254
CI: fix Tauri action invocation (use `yarn tauri` so action appends `…
haslinghuis Oct 25, 2025
f25d3d2
CI(Linux): install pkg-config, libudev-dev, and libssl-dev to satisfy…
haslinghuis Oct 25, 2025
b3f3259
Publish
haslinghuis Oct 26, 2025
6873847
Remove fallback
haslinghuis Oct 26, 2025
1647074
Fix artifact-links workflow: trigger on "CI" workflow instead of non-…
haslinghuis Oct 26, 2025
b7cf233
Fix artifact-links: only run when CI was triggered by pull_request (s…
haslinghuis Oct 26, 2025
cbbdcf2
Add permissions to artifact-links workflow (pull-requests: write, act…
haslinghuis Oct 26, 2025
56f2783
Rewrite artifact-links workflow with github-script for better reliabi…
haslinghuis Oct 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ capacitor.config.json

# Ignore Gradle build output directory
build

# Ignore Tauri build artifacts
src-tauri/target/
src-tauri/gen/
44 changes: 44 additions & 0 deletions DOCKER.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 🐳 Development Environment with Docker

To ensure all developers use a consistent environment, especially for cross-platform compilation (Rust, Node.js, Android SDK/NDK), we provide a Dockerfile.

## 1. Build the Docker Image

Build the container image from the Dockerfile in the project root. This process will download all system dependencies, the Rust toolchain, and the Android SDK/NDK.

```bash
docker build -t betaflight-tauri-dev .
```

## 2. Run the Development Container

Run the image and mount your local project directory into the container's /app directory. This allows you to work on your code locally while running all build commands inside the isolated Docker environment.

```bash
docker run -it --rm \
-v $(pwd):/app \
--name betaflight-dev-container \
betaflight-tauri-dev

-it: Runs the container in interactive mode with a TTY (shell access).

--rm: Automatically removes the container when you exit.

-v $(pwd):/app: Mounts your current directory (the project root) to the /app working directory in the container.
```

## 3. Execute Build/Dev Commands

Once inside the container's terminal, you can run any of the Tauri commands without needing to worry about local prerequisites.

Command | Purpose
--- | ---
bun install | Installs the frontend dependencies.
bun tauri dev | Runs the desktop development server.
bun tauri android dev | Runs the app on a connected Android device or emulator (must be running outside of the container).
bun tauri android build | Builds a release APK for Android.

You may need to start an Android emulator on your host machine before running bun tauri android dev.

You can watch this video for a practical demonstration of setting up a dev container for Tauri and Android development.
https://www.youtube.com/watch?v=X3EThnruPA4
77 changes: 77 additions & 0 deletions DockerFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Use a base image that supports the necessary build tools
FROM debian:bookworm-slim

# Set environment variables for non-interactive installs and Android components
# You may need to update these versions over time
ENV DEBIAN_FRONTEND=noninteractive
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
ANDROID_SDK_ROOT=/usr/local/android-sdk \
NDK_VERSION=26.3.11579204 \
SDK_PLATFORM_VERSION=34 \
SDK_BUILD_TOOLS_VERSION=34.0.0
ENV PATH=$CARGO_HOME/bin:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$PATH

# --- Install System Dependencies (Rust, Node.js, and Build Tools) ---
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
wget \
xz-utils \
unzip \
git \
build-essential \
libwebkit2gtk-4.1-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libxdo-dev \
# Dependencies for Android build targets (needed for the linker)
clang \
llvm \
g++-multilib \
openjdk-17-jdk \
&& rm -rf /var/lib/apt/lists/*

# Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable

# Add Rust targets for Android
RUN $CARGO_HOME/bin/rustup target add \
aarch64-linux-android \
armv7-linux-androideabi \
i686-linux-android \
x86_64-linux-android

# Install a Node.js runtime (e.g., Bun, or use Node/NPM if preferred)
# Replace this section with your preferred runtime installation (npm, yarn, pnpm)
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:$PATH"

# --- Install Android SDK/NDK ---
# Download the Android SDK command line tools
RUN mkdir -p $ANDROID_SDK_ROOT/cmdline-tools && \
wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O cmdline-tools.zip && \
unzip -q cmdline-tools.zip -d $ANDROID_SDK_ROOT/cmdline-tools && \
mv $ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools $ANDROID_SDK_ROOT/cmdline-tools/latest && \
rm cmdline-tools.zip

# Accept licenses and install platform tools, platforms, and NDK
RUN yes | sdkmanager --licenses && \
sdkmanager \
"platform-tools" \
"platforms;android-${SDK_PLATFORM_VERSION}" \
"build-tools;${SDK_BUILD_TOOLS_VERSION}" \
"ndk;${NDK_VERSION}"

# Set the NDK_HOME environment variable
ENV NDK_HOME=$ANDROID_SDK_ROOT/ndk/${NDK_VERSION}

# Create a non-root user and set it as the working user
# This is a security best practice
RUN useradd -ms /bin/bash developer && chown -R developer:developer /usr/local/
USER developer
WORKDIR /app

# The ENTRYPOINT should be set to your shell to allow running commands
ENTRYPOINT ["/bin/bash"]
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"android:release": "vite build && node capacitor.config.generator.mjs && npx cap build android --release",
"format": "prettier --write {src,test}/**/*.{js,vue,css,less}",
"storybook": "start-storybook -p 6006",
"prepare": "husky install"
"prepare": "husky install",
"tauri:dev": "tauri dev",
"tauri:build": "tauri build"
},
"window": {
"icon": "images/bf_icon_128.png",
Expand All @@ -44,6 +46,8 @@
"@capacitor/android": "^7.0.1",
"@capacitor/core": "^7.0.1",
"@fortawesome/fontawesome-free": "^6.5.2",
"@tauri-apps/api": "^2.9.0",
"@tauri-apps/cli": "^2.9.1",
"@vitejs/plugin-vue": "^6.0.1",
"crypto-es": "^2.1.0",
"d3": "^7.9.0",
Expand Down
Loading