diff --git a/soroban-sdk/src/lib.rs b/soroban-sdk/src/lib.rs index 95207d7a..0a3d4387 100644 --- a/soroban-sdk/src/lib.rs +++ b/soroban-sdk/src/lib.rs @@ -47,6 +47,12 @@ #[cfg(all(target_family = "wasm", feature = "testutils"))] compile_error!("'testutils' feature is not supported on 'wasm' target"); +#[cfg(all(target_family = "wasm", target_feature = "reference-types"))] +compile_error!("Compiler configuration is unsupported by Soroban Environment, because a Wasm target-feature is enabled that is not yet supported: reference-types. Use Rust 1.81 or older to get a compatible default configuration."); + +#[cfg(all(target_family = "wasm", target_feature = "multivalue"))] +compile_error!("Compiler configuration is unsupported by Soroban Environment, because a Wasm target-feature is enabled that is not yet supported: multivalue. Use Rust 1.81 or older to get a compatible default configuration."); + // When used in a no_std contract, provide a panic handler as one is required. #[cfg(all(not(feature = "alloc"), target_family = "wasm"))] #[panic_handler]