[bug] error[E0252]: webview_version defined multiple times when both wry and cef features active

Open Beginner friendly
#15,265 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
rust
Domain
desktop

Research direction

Start in crates/tauri/src/lib.rs around lines 226-232 and inspect how the wry and cef features re-export webview_version. Build the Linux configuration with both features active to reproduce error[E0252]. Done means the combined-feature build no longer reports duplicate webview_version definitions.

Written by the indexing model from the issue text.

Description

scope: cef status: needs triage type: bug
Describe the bug

When building with features = ["cef"] on Linux, both tauri_runtime_wry and tauri_runtime_cef are compiled, causing a name conflict:

error[E0252]: the name webview_version is defined multiple times

 --> crates/tauri/src/lib.rs:232:9

Cause: Both re-exports compile simultaneously:

// line 228
pub use tauri_runtime_wry::webview_version;
// line 232  
pub use tauri_runtime_cef::webview_version;

Temporary Fix: Gate the wry export behind not(feature = "cef"):

line 226, change:

#[cfg(feature = "wry")]
//to:
#[cfg(all(feature = "wry", not(feature = "cef")))]

Environment: Linux (Arch), Tauri feat/cef branch @ 562bc59

Reproduction

No response

Expected behavior

No response

Full tauri info output
n/a
Stack trace

Additional context

No response

Dominant language
Rust
Stars
111k
Forks
4k
Avg merge
1d 22h
Merged PRs (30d)
62

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.

More from tauri-apps/tauri

All issues in tauri-apps/tauri

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.