Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions .agents/skills/platform-builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ Windows ARM64 support came from targeted external work. When touching platform l

Windows build scripts have failed on paths from different drives and on argument escaping. Prefer explicit drive-aware shell behavior and quoted structured paths.

When upgrading Rust toolchain versions, Windows CI may fail due to CMake cache conflicts with Visual Studio generator versions. The fix requires comprehensive cleanup of CMake cache files and explicit generator specification:

- Clean `CMakeCache.txt`, `CMakeFiles/`, `*.cmake`, and `cmake_install.cmake` in the build directory
- Set `CMAKE_GENERATOR="Visual Studio 17 2022"` environment variable before building
- Use `-ErrorAction SilentlyContinue` on PowerShell Remove-Item commands to handle missing files gracefully

This pattern should be applied to all Windows build steps in CI workflows.

## eLinux

eLinux support exists as a platform surface. When editing package platform lists, generated plugin metadata, or Cargokit target handling, preserve eLinux entries unless intentionally removing support.
Expand Down
34 changes: 21 additions & 13 deletions .github/workflows/example_app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ concurrency:

jobs:
build:
name: ${{ matrix.runner }} / ${{ matrix.target }}
runs-on: ${{ matrix.runner }}-latest
name: ${{ matrix.os }} / ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # Important
matrix:
runner: [ubuntu, windows, macos]
os: [ubuntu-latest, windows-2022, macos-latest]
target: [android, web] # On all platforms
include:
# Specify targets for each platform
- runner: ubuntu
- os: ubuntu-latest
target: linux
- runner: windows
- os: windows-2022
target: windows
- runner: macos
- os: macos-latest
target: macos
- runner: macos
- os: macos-latest
target: ios

steps:
Expand All @@ -56,19 +56,19 @@ jobs:
target
~/.pub-cache
key: >
${{ matrix.runner }}-${{ matrix.target }}
${{ matrix.os }}-${{ matrix.target }}
${{ hashFiles('**/Cargo.toml', '**/pubspec.yaml') }}
restore-keys: |
${{ matrix.runner }}-${{ matrix.target }}
${{ matrix.runner }}
${{ matrix.os }}-${{ matrix.target }}
${{ matrix.os }}

- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
with:
flutter-version: "3.24.0"
flutter-version: "3.27.4"

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@1.88
uses: dtolnay/rust-toolchain@1.91
with:
components: rustfmt

Expand Down Expand Up @@ -111,7 +111,15 @@ jobs:
- name: Build the example app
if: matrix.target == 'windows'
working-directory: flutter_package/example/
run: flutter build windows --verbose
run: |
$buildDir = "build/windows"
if (Test-Path $buildDir) {
Remove-Item "$buildDir/CMakeCache.txt" -Force -ErrorAction SilentlyContinue
Remove-Item "$buildDir/CMakeFiles" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item "$buildDir/*.cmake" -Force -ErrorAction SilentlyContinue
Remove-Item "$buildDir/cmake_install.cmake" -Force -ErrorAction SilentlyContinue
}
flutter build windows --verbose

- name: Build the example app
if: matrix.target == 'macos'
Expand Down
34 changes: 21 additions & 13 deletions .github/workflows/test_app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ concurrency:

jobs:
build:
name: ${{ matrix.runner }} / ${{ matrix.target }}
runs-on: ${{ matrix.runner }}-latest
name: ${{ matrix.os }} / ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # Important
matrix:
runner: [ubuntu, windows, macos]
os: [ubuntu-latest, windows-2022, macos-latest]
target: [android, web] # On all platforms
include:
# Specify targets for each platform
- runner: ubuntu
- os: ubuntu-latest
target: linux
- runner: windows
- os: windows-2022
target: windows
- runner: macos
- os: macos-latest
target: macos
- runner: macos
- os: macos-latest
target: ios

steps:
Expand All @@ -57,19 +57,19 @@ jobs:
target
~/.pub-cache
key: >
${{ matrix.runner }}-${{ matrix.target }}
${{ matrix.os }}-${{ matrix.target }}
${{ hashFiles('**/Cargo.toml', '**/pubspec.yaml') }}
restore-keys: |
${{ matrix.runner }}-${{ matrix.target }}
${{ matrix.runner }}
${{ matrix.os }}-${{ matrix.target }}
${{ matrix.os }}

- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
with:
flutter-version: "3.24.0"
flutter-version: "3.27.4"

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@1.88
uses: dtolnay/rust-toolchain@1.91
with:
components: rustfmt

Expand Down Expand Up @@ -112,7 +112,15 @@ jobs:
- name: Build the example app
if: matrix.target == 'windows'
working-directory: test_app/
run: flutter build windows --verbose
run: |
$buildDir = "build/windows"
if (Test-Path $buildDir) {
Remove-Item "$buildDir/CMakeCache.txt" -Force -ErrorAction SilentlyContinue
Remove-Item "$buildDir/CMakeFiles" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item "$buildDir/*.cmake" -Force -ErrorAction SilentlyContinue
Remove-Item "$buildDir/cmake_install.cmake" -Force -ErrorAction SilentlyContinue
}
flutter build windows --verbose

- name: Build the example app
if: matrix.target == 'macos'
Expand Down
30 changes: 19 additions & 11 deletions .github/workflows/user_app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ on:

jobs:
build:
name: ${{ matrix.runner }} / ${{ matrix.target }}
runs-on: ${{ matrix.runner }}-latest
name: ${{ matrix.os }} / ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # Important
matrix:
runner: [ubuntu, windows, macos]
os: [ubuntu-latest, windows-2022, macos-latest]
target: [android, web] # On all platforms
include:
# Specify targets for each platform
- runner: ubuntu
- os: ubuntu-latest
target: linux
- runner: windows
- os: windows-2022
target: windows
- runner: macos
- os: macos-latest
target: macos
- runner: macos
- os: macos-latest
target: ios

steps:
Expand All @@ -42,11 +42,11 @@ jobs:
target
~/.pub-cache
key: >
${{ matrix.runner }}-${{ matrix.target }}
${{ matrix.os }}-${{ matrix.target }}
${{ hashFiles('**/Cargo.toml', '**/pubspec.yaml') }}
restore-keys: |
${{ matrix.runner }}-${{ matrix.target }}
${{ matrix.runner }}
${{ matrix.os }}-${{ matrix.target }}
${{ matrix.os }}

- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
Expand Down Expand Up @@ -97,7 +97,15 @@ jobs:
- name: Build the example app
if: matrix.target == 'windows'
working-directory: user_app/
run: flutter build windows --verbose
run: |
$buildDir = "build/windows"
if (Test-Path $buildDir) {
Remove-Item "$buildDir/CMakeCache.txt" -Force -ErrorAction SilentlyContinue
Remove-Item "$buildDir/CMakeFiles" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item "$buildDir/*.cmake" -Force -ErrorAction SilentlyContinue
Remove-Item "$buildDir/cmake_install.cmake" -Force -ErrorAction SilentlyContinue
}
flutter build windows --verbose

- name: Build the example app
if: matrix.target == 'macos'
Expand Down
2 changes: 1 addition & 1 deletion documentation/source/installing-toolchains.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Each Rinf version is compatible with the toolchain versions listed below and new

| Rinf Version | Flutter/Dart Version | Rust Version |
| ------------ | -------------------- | ------------ |
| 8.9 | 3.24/3.5 | 1.88 |
| 8.9 | 3.27/3.6 | 1.91 |
| 8.8 | N/A | N/A |
| 8.7 | N/A | N/A |
| 8.6 | N/A | N/A |
Expand Down
5 changes: 3 additions & 2 deletions rust_crate_cli/src/tool/webassembly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ fn install_wasm_toolchain() -> Result<(), SetupError> {
.output()?
.capture_err()?;
Command::new("cargo")
.args(["install", "--locked", "wasm-pack"])
.args(["+nightly", "install", "--locked", "wasm-pack"])
.output()?
.capture_err()?;
Command::new("cargo")
.args(["install", "--locked", "wasm-bindgen-cli"])
.args(["+nightly", "install", "--locked", "wasm-bindgen-cli"])
.output()?
.capture_err()?;
Ok(())
Expand Down Expand Up @@ -109,6 +109,7 @@ fn compile_wasm(
"-C link-arg=--shared-memory ",
"-C link-arg=--max-memory=1073741824 ",
"-C link-arg=--import-memory ",
"-C link-arg=--export=__heap_base ",
"-C link-arg=--export=__wasm_init_tls ",
"-C link-arg=--export=__tls_size ",
"-C link-arg=--export=__tls_align ",
Expand Down