Skip to content

Conversation

@digi4care
Copy link

Problem

  1. Running bun run tauri dev fails with error: cargo run could not determine which binary to run
  2. On Linux with Wayland and NVIDIA GPU, app fails with: Failed to create GBM buffer of size 800x600
  3. Rust compiler warnings for snake_case and dead_code

Approach

  1. Added default-run = "opcode" to Cargo.toml to specify the default binary
  2. Added automatic detection and workaround for Wayland sessions in main.rs:
    • Detects Wayland via WAYLAND_DISPLAY or XDG_SESSION_TYPE
    • Only applies WEBKIT_DISABLE_DMABUF_RENDERER=1 when needed
    • Respects user-defined environment variables
  3. Fixed snake_case warnings: renamed sessionId to session_id in web_server.rs
  4. Added #[allow(dead_code)] for register_sidecar_process (kept for future use)

Limitations

  • The Wayland/NVIDIA fix is a workaround for an upstream WebKitGTK issue, not a native fix
  • Only affects Linux Wayland users; X11 users are unaffected

Testing

  • Tested on Arch Linux with KDE 6 (Wayland) and NVIDIA GPU
  • Verified bun run tauri dev runs without errors
  • Verified cargo build completes without warnings

- Add default-run = "opcode" to Cargo.toml to fix binary selection
- Add automatic WEBKIT_DISABLE_DMABUF_RENDERER for Wayland sessions
- Fix snake_case warnings in web_server.rs (sessionId -> session_id)
- Suppress dead_code warning for register_sidecar_process

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant