@@ -331,6 +331,8 @@ wasmtime_option_group! {
331
331
pub trap_on_grow_failure: Option <bool >,
332
332
/// Maximum execution time of wasm code before timing out (1, 2s, 100ms, etc)
333
333
pub timeout: Option <Duration >,
334
+ /// Size of stacks created with cont.new instructions
335
+ pub stack_switching_stack_size: Option <usize >,
334
336
/// Configures support for all WebAssembly proposals implemented.
335
337
pub all_proposals: Option <bool >,
336
338
/// Configure support for the bulk memory proposal.
@@ -366,6 +368,10 @@ wasmtime_option_group! {
366
368
pub component_model_async: Option <bool >,
367
369
/// Configure support for the function-references proposal.
368
370
pub function_references: Option <bool >,
371
+ /// Configure support for the exceptions proposal.
372
+ pub exceptions: Option <bool >,
373
+ /// Configure support for the stack-switching proposal.
374
+ pub stack_switching: Option <bool >,
369
375
/// Configure support for the GC proposal.
370
376
pub gc: Option <bool >,
371
377
/// Configure support for the custom-page-sizes proposal.
@@ -801,6 +807,12 @@ impl CommonOptions {
801
807
config. native_unwind_info ( enable) ;
802
808
}
803
809
810
+ match_feature ! {
811
+ [ "stack-switching" : self . wasm. stack_switching_stack_size]
812
+ size => config. stack_switching_stack_size( size) ,
813
+ _ => err,
814
+ }
815
+
804
816
match_feature ! {
805
817
[ "pooling-allocator" : self . opts. pooling_allocator. or( pooling_allocator_default) ]
806
818
enable => {
@@ -962,6 +974,12 @@ impl CommonOptions {
962
974
if let Some ( enable) = self . wasm . memory64 . or ( all) {
963
975
config. wasm_memory64 ( enable) ;
964
976
}
977
+ if let Some ( enable) = self . wasm . exceptions {
978
+ config. wasm_exceptions ( enable) ;
979
+ }
980
+ if let Some ( enable) = self . wasm . stack_switching {
981
+ config. wasm_stack_switching ( enable) ;
982
+ }
965
983
if let Some ( enable) = self . wasm . custom_page_sizes . or ( all) {
966
984
config. wasm_custom_page_sizes ( enable) ;
967
985
}
@@ -992,6 +1010,10 @@ impl CommonOptions {
992
1010
( "gc" , gc, wasm_gc)
993
1011
( "gc" , reference_types, wasm_reference_types)
994
1012
( "gc" , function_references, wasm_function_references)
1013
+ // FIXME(frank-emrich): If function-references depends on the gc
1014
+ // feature, and stack-switching requires function-references, that
1015
+ // probably means that stack-switching should depend on gc.
1016
+ ( "stack-switching" , stack_switching, wasm_stack_switching)
995
1017
}
996
1018
Ok ( ( ) )
997
1019
}
0 commit comments