@@ -377,8 +377,6 @@ wasmtime_option_group! {
377377 pub component_model_error_context: Option <bool >,
378378 /// Configure support for the function-references proposal.
379379 pub function_references: Option <bool >,
380- /// Configure support for the stack-switching proposal.
381- pub stack_switching: Option <bool >,
382380 /// Configure support for the GC proposal.
383381 pub gc: Option <bool >,
384382 /// Configure support for the custom-page-sizes proposal.
@@ -820,23 +818,6 @@ impl CommonOptions {
820818 config. native_unwind_info ( enable) ;
821819 }
822820
823- // async_stack_size enabled by either async or stack-switching, so
824- // cannot directly use match_feature!
825- #[ cfg( any( feature = "async" , feature = "stack-switching" ) ) ]
826- {
827- if let Some ( size) = self . wasm . async_stack_size {
828- config. async_stack_size ( size) ;
829- }
830- }
831- #[ cfg( not( any( feature = "async" , feature = "stack-switching" ) ) ) ]
832- {
833- if let Some ( _size) = self . wasm . async_stack_size {
834- anyhow:: bail!( concat!(
835- "support for async/stack-switching disabled at compile time"
836- ) ) ;
837- }
838- }
839-
840821 match_feature ! {
841822 [ "pooling-allocator" : self . opts. pooling_allocator. or( pooling_allocator_default) ]
842823 enable => {
@@ -942,6 +923,11 @@ impl CommonOptions {
942923 ) ;
943924 }
944925
926+ match_feature ! {
927+ [ "async" : self . wasm. async_stack_size]
928+ size => config. async_stack_size( size) ,
929+ _ => err,
930+ }
945931 match_feature ! {
946932 [ "async" : self . wasm. async_stack_zeroing]
947933 enable => config. async_stack_zeroing( enable) ,
@@ -954,7 +940,7 @@ impl CommonOptions {
954940 // If `-Wasync-stack-size` isn't passed then automatically adjust it
955941 // to the wasm stack size provided here too. That prevents the need
956942 // to pass both when one can generally be inferred from the other.
957- #[ cfg( any ( feature = "async" , feature = "stack-switching" ) ) ]
943+ #[ cfg( feature = "async" ) ]
958944 if self . wasm . async_stack_size . is_none ( ) {
959945 const DEFAULT_HOST_STACK : usize = 512 << 10 ;
960946 config. async_stack_size ( max + DEFAULT_HOST_STACK ) ;
@@ -997,9 +983,6 @@ impl CommonOptions {
997983 if let Some ( enable) = self . wasm . memory64 . or ( all) {
998984 config. wasm_memory64 ( enable) ;
999985 }
1000- if let Some ( enable) = self . wasm . stack_switching {
1001- config. wasm_stack_switching ( enable) ;
1002- }
1003986 if let Some ( enable) = self . wasm . custom_page_sizes . or ( all) {
1004987 config. wasm_custom_page_sizes ( enable) ;
1005988 }
@@ -1040,7 +1023,6 @@ impl CommonOptions {
10401023 ( "gc" , gc, wasm_gc)
10411024 ( "gc" , reference_types, wasm_reference_types)
10421025 ( "gc" , function_references, wasm_function_references)
1043- ( "stack-switching" , stack_switching, wasm_stack_switching)
10441026 }
10451027 Ok ( ( ) )
10461028 }
0 commit comments