Skip to content

Commit d7302ef

Browse files
authored
Plumb the wasmtime-internal-error/backtrace cargo feature through to wasmtime (#12390)
1 parent af0ae83 commit d7302ef

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ default = [
477477
"wasi-tls",
478478

479479
# Most features of Wasmtime are enabled by default.
480+
"backtrace",
480481
"wat",
481482
"parallel-compilation",
482483
"pooling-allocator",
@@ -540,6 +541,7 @@ wasi-http = ["component-model", "dep:wasmtime-wasi-http", "dep:tokio", "dep:hype
540541
wasi-config = ["dep:wasmtime-wasi-config"]
541542
wasi-keyvalue = ["dep:wasmtime-wasi-keyvalue"]
542543
pooling-allocator = ["wasmtime/pooling-allocator", "wasmtime-cli-flags/pooling-allocator"]
544+
backtrace = ["wasmtime/backtrace"]
543545
component-model = [
544546
"wasmtime/component-model",
545547
"wasmtime-wast?/component-model",

crates/environ/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ required-features = ['component-model', 'compile']
5757

5858
[features]
5959
anyhow = ["wasmtime-error/anyhow"]
60+
backtrace = ["std", "wasmtime-error/backtrace"]
6061
component-model = [
6162
"dep:wasmtime-component-util",
6263
"dep:semver",
@@ -81,4 +82,5 @@ std = [
8182
'object/std',
8283
'wasmparser/std',
8384
'indexmap/std',
85+
'wasmtime-error/std',
8486
]

crates/wasmtime/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ harness = false
133133
[features]
134134
default = [
135135
'async',
136+
'backtrace',
136137
'cache',
137138
'gc',
138139
'gc-drc',
@@ -159,6 +160,9 @@ default = [
159160
# Enables conversion helpers between `anyhow::Error` and `wasmtime::Error`.
160161
anyhow = ["wasmtime-environ/anyhow"]
161162

163+
# Enables backtrace capturing in `wasmtime::Error`.
164+
backtrace = ["std", "wasmtime-environ/backtrace"]
165+
162166
# An on-by-default feature enabling runtime compilation of WebAssembly modules
163167
# with the Cranelift compiler. Cranelift is the default compilation backend of
164168
# Wasmtime. If disabled then WebAssembly modules can only be created from

0 commit comments

Comments
 (0)