File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -37,4 +37,22 @@ def compute_argv(test_path: str,
3737 argv += ["--dir" , f"{ host } ::{ guest } " ] # noqa: E231
3838 argv += [test_path ]
3939 argv += args
40+ _add_wasi_version_options (argv , wasi_version )
4041 return argv
42+
43+
44+ # The user might provide WASMTIME="wasmtime --option -Sfoo". Let's
45+ # insert the options to choose the WASI version before the user's
46+ # options, so that the user can override our choices.
47+ def _add_wasi_version_options (argv : List [str ], wasi_version : str ) -> None :
48+ splice_pos = len (WASMTIME )
49+ while splice_pos > 1 and args [splice_pos - 1 ].startswith ("-" ):
50+ splice_pos -= 1
51+ match wasi_version :
52+ case "wasm32-wasip1" :
53+ pass
54+ case "wasm32-wasip3" :
55+ argv [splice_pos :splice_pos ] = ["-Wcomponent-model-async" ,
56+ "-Sp3,http" ]
57+ case _:
58+ pass
You can’t perform that action at this time.
0 commit comments