From 0179a4cf25275d383e3dd1147868ce7e33d7ceb8 Mon Sep 17 00:00:00 2001 From: Richard Zak Date: Mon, 11 Jul 2022 18:08:06 -0400 Subject: [PATCH] feat: gate enhanced Wasm support on tokio_unstable Signed-off-by: Richard Zak --- tokio/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tokio/src/lib.rs b/tokio/src/lib.rs index c0d7e6252e4..4d50fffcd3d 100644 --- a/tokio/src/lib.rs +++ b/tokio/src/lib.rs @@ -393,6 +393,10 @@ compile_error! { "Tokio requires the platform pointer width to be 32, 64, or 128 bits" } +#[cfg(not(tokio_unstable))] +#[cfg(wasm, any(feature = "fs", feature = "io-std", feature = "net", feature = "process", feature = "rt-multi-thread", feature = "signal", feature = "time"))] +compile_error!("Only features sync,macros,io-util,rt are supported on wasm."); + // Includes re-exports used by macros. // // This module is not intended to be part of the public API. In general, any