File tree 4 files changed +7
-4
lines changed
4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ wasmtime-cli-flags = { workspace = true }
28
28
wasmtime-cranelift = { workspace = true }
29
29
wasmtime-environ = { workspace = true }
30
30
wasmtime-wast = { workspace = true }
31
- wasmtime-wasi = { workspace = true }
31
+ wasmtime-wasi = { workspace = true , features = [ " exit " ] }
32
32
wasmtime-wasi-crypto = { workspace = true , optional = true }
33
33
wasmtime-wasi-nn = { workspace = true , optional = true }
34
34
wasmtime-wasi-threads = { workspace = true , optional = true }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ log = { workspace = true }
17
17
rand = " 0.8"
18
18
wasi-common = { workspace = true }
19
19
wasmtime = { workspace = true }
20
- wasmtime-wasi = { workspace = true }
20
+ wasmtime-wasi = { workspace = true , features = [ " exit " ] }
21
21
22
22
[badges ]
23
23
maintenance = { status = " experimental" }
Original file line number Diff line number Diff line change @@ -25,3 +25,4 @@ anyhow = { workspace = true }
25
25
default = [" sync" ]
26
26
sync = [" wasi-cap-std-sync" ]
27
27
tokio = [" wasi-tokio" , " wasmtime/async" , " wiggle/wasmtime_async" ]
28
+ exit = []
Original file line number Diff line number Diff line change @@ -87,8 +87,10 @@ pub mod snapshots {
87
87
/// understands the error. If the error is not an `I32Exit` or `Trap`, return
88
88
/// the error back to the caller for it to decide what to do.
89
89
///
90
- /// Note: this function is designed for CLI usage of Wasmtime; embedders of
91
- /// Wasmtime may want different error handling.
90
+ /// Note: this function is designed for usage where it is acceptable for
91
+ /// Wasmtime failures to terminate the parent process, such as in the Wasmtime
92
+ /// CLI; this would not be suitable for use in multi-tenant embeddings.
93
+ #[ cfg( feature = "exit" ) ]
92
94
pub fn maybe_exit_on_error ( e : anyhow:: Error ) -> anyhow:: Error {
93
95
use std:: process;
94
96
use wasmtime:: Trap ;
You can’t perform that action at this time.
0 commit comments