File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Expand file tree Collapse file tree 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 }
2828wasmtime-cranelift = { workspace = true }
2929wasmtime-environ = { workspace = true }
3030wasmtime-wast = { workspace = true }
31- wasmtime-wasi = { workspace = true }
31+ wasmtime-wasi = { workspace = true , features = [ " exit " ] }
3232wasmtime-wasi-crypto = { workspace = true , optional = true }
3333wasmtime-wasi-nn = { workspace = true , optional = true }
3434wasmtime-wasi-threads = { workspace = true , optional = true }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ log = { workspace = true }
1717rand = " 0.8"
1818wasi-common = { workspace = true }
1919wasmtime = { workspace = true }
20- wasmtime-wasi = { workspace = true }
20+ wasmtime-wasi = { workspace = true , features = [ " exit " ] }
2121
2222[badges ]
2323maintenance = { status = " experimental" }
Original file line number Diff line number Diff line change @@ -25,3 +25,4 @@ anyhow = { workspace = true }
2525default = [" sync" ]
2626sync = [" wasi-cap-std-sync" ]
2727tokio = [" 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 {
8787/// understands the error. If the error is not an `I32Exit` or `Trap`, return
8888/// the error back to the caller for it to decide what to do.
8989///
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" ) ]
9294pub fn maybe_exit_on_error ( e : anyhow:: Error ) -> anyhow:: Error {
9395 use std:: process;
9496 use wasmtime:: Trap ;
You can’t perform that action at this time.
0 commit comments