Cannot add to rustc 'tokio_unstable" flag in cargo.toml

I'm trying to add the following flag to cargo.toml

[build]
rustflags = ["--cfg", "tokio_unstable"]

Alas, that doesn't have any effect. I still get the error when trying to run my app:

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

Any help greately appreciated.

I think you want .cargo/config.toml, not Cargo.toml.

1 Like

Thank you

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.