tauri-apps / tauri-apps/tauri

feat/cef: dev CEF assembly ignores CARGO_BUILD_TARGET, reads only .cargo/config.toml

Open
#15,768 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

platform: macOS scope: cef status: needs triage type: bug
Dominant language
Rust
Stars
111k
Forks
4k
Avg merge
2d 7h
Merged PRs (30d)
45

Description

On branch feat/cef (rev be0f6b5), cargo tauri dev on macOS builds the app with the target cargo resolves from the CARGO_BUILD_TARGET environment variable, but the CEF bundling/dev-assembly step resolves the target from .cargo/config.toml's build.target only. In a repo whose cargo config defaults to a cross deploy target, the run ends with:

    Finished `dev` profile [unoptimized + debuginfo] target(s) in 45.31s
       Error invalid CEF target x86_64-unknown-linux-musl: Unsupported target triplet: x86_64-unknown-linux-musl

even though CARGO_BUILD_TARGET=aarch64-apple-darwin was set (and cargo compiled for it, as the successful build shows). Cargo gives the env var precedence over the config file, so the CLI's target resolution should too. Workaround: pass --target explicitly.

(reported by an AI agent via Claude Code on behalf of a user)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the cargo tauri dev target-resolution path and the CEF bundling/dev-assembly step. Compare how CARGO_BUILD_TARGET, .cargo/config.toml's build.target, and an explicit --target are handled, then reproduce the macOS case with a cross-target config. Done means the CEF step uses the same target Cargo selected from the environment and no longer rejects the valid target.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, cli, desktop-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.