Skip to content

build: add --cfg tokio_unstable to cargo rustflags (fixes GUI crash at startup) - #362

Closed
rafa57600 wants to merge 1 commit into
OpenGamingCollective:mainfrom
rafa57600:fix/tokio_unstable_cfg
Closed

build: add --cfg tokio_unstable to cargo rustflags (fixes GUI crash at startup)#362
rafa57600 wants to merge 1 commit into
OpenGamingCollective:mainfrom
rafa57600:fix/tokio_unstable_cfg

Conversation

@rafa57600

@rafa57600 rafa57600 commented Sep 6, 2026

Copy link
Copy Markdown

What

Add rustflags = ["--cfg", "tokio_unstable"] to .cargo/config.toml so every Cargo build gets the cfg flag the code already requires.

Why

console-subscriber ^0.5.0 is an unconditional dependency, and rog-control-center/src/main.rs calls console_subscriber::init() unconditionally. When Tokio was not compiled with --cfg tokio_unstable, that call panics at startup and rog-control-center aborts immediately (SIGABRT → core dump):

thread 'main' panicked at .../console-subscriber-0.5.0/src/lib.rs:266:9:
task tracing requires Tokio to be built with RUSTFLAGS="--cfg tokio_unstable"!

The flag is not committed anywhere in the repo: not in .cargo/config.toml, not in the Makefile, not in distro-packaging/PKGBUILD, not in the CI workflows. So any build of the release tarball without a specially-set RUSTFLAGS env produces a GUI that cannot start.

Impact

  • Official Arch Linux extra package (rog-control-center 6.4.0-2, built from this tarball): GUI crashes on every launch.
  • The project's own release.yml build path (distro-packaging/PKGBUILDmake build → plain cargo build) is affected the same way.
  • Any other distro/CI building from the tarball: same.

Test

# before the fix (as distro PKGBUILDs build):
cargo build --release --all-features && ./target/release/rog-control-center  # aborts
# after the fix: the GUI starts and stays open

Verified locally against 6.4.0 (the Arch PKGBUILD with this flag builds and runs correctly; without it, crashes).

🤖 Generated with AnthraCode (https://anthracode.com)

Closes #363

console-subscriber::init() (called unconditionally in
rog-control-center/src/main.rs) panics at startup when Tokio is not
compiled with --cfg tokio_unstable:

  task tracing requires Tokio to be built with RUSTFLAGS="--cfg tokio_unstable"!

The flag is not committed anywhere in the repo (.cargo/config.toml,
Makefile, distro-packaging/PKGBUILD and the workflows all omit it),
so every build of the release tarball without a special RUSTFLAGS env
produces a GUI that aborts immediately on launch (SIGABRT). Reproduced
with the official Arch Linux package and the project's own release.yml
build path.

Committing the flag in .cargo/config.toml makes every Cargo build
(including distro builds from the source tarball) compile with it by
default.

Co-authored-by: AnthraCode <288609694+anthracode@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 63b3d614-8a67-46c3-b27d-cd0fa0586fe0

📥 Commits

Reviewing files that changed from the base of the PR and between 5d22d0a and be3d6d2.

📒 Files selected for processing (1)
  • .cargo/config.toml

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📜 Recent review details
🔇 Additional comments (1)
.cargo/config.toml (1)

11-11: 🎯 Functional Correctness

Keep the single [build] table header.

.cargo/config.toml contains one [build] declaration. The duplicate-table finding does not apply.


📝 Summary

Summary by CodeRabbit

  • Build Improvements
    • Updated build configuration to enable required Tokio functionality for the control center.

Walkthrough

The Cargo configuration now applies --cfg tokio_unstable to all Rust builds. This supports the console-subscriber startup check in rog-control-center.

Changes

Tokio build configuration

Layer / File(s) Summary
Enable Tokio unstable compilation
.cargo/config.toml
Adds the tokio_unstable Rust flag to the global Cargo build configuration.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to be3d6

This enables the Tokio configuration required by console-subscriber, preventing the control center from aborting during startup. No merge-blocking risk is established.

Suggested labels: fix, rog-control-center

Suggested reviewers: ghoul4500

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: adding the Tokio unstable configuration to Cargo to prevent the GUI startup crash.
Description check ✅ Passed The description explains what changed, why it was required, the startup failure, affected build paths, the issue, and local verification. The hardware and environment fields and checklist items are no…

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added fix Fix a bug or an issue rog-control-center ROG Control Center GUI labels Sep 6, 2026
@Ghoul4500

Copy link
Copy Markdown
Member

This is an AI hallucination and violates our contributing guidelines. This will be closed as slop.

@Ghoul4500 Ghoul4500 closed this Sep 7, 2026
@Ghoul4500 Ghoul4500 added the slop AI Slop label Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Fix a bug or an issue rog-control-center ROG Control Center GUI slop AI Slop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rog-control-center crashes at startup: --cfg tokio_unstable not committed in repo build config

2 participants