@@ -164,10 +164,9 @@ fn wasmtime_config(ec: &EngineConfig) -> anyhow::Result<wasmtime::Config> {
164
164
c. static_memory_maximum_size ( instance_memory_maximum_size) ;
165
165
c. static_memory_forced ( true ) ;
166
166
167
- // wasmtime default: true
168
- // We don't want threads, there is no way to ensure determinism
169
- #[ cfg( feature = "wasmtime/threads" ) ]
170
- c. wasm_threads ( false ) ;
167
+ // Note: Threads are disabled by default.
168
+ // If we add the "wasmtime/threads" feature in the future,
169
+ // we would explicitly set c.wasm_threads(false) here.
171
170
172
171
// wasmtime default: true
173
172
// simd isn't supported in wasm-instrument, but if we add support there, we can probably enable
@@ -197,15 +196,9 @@ fn wasmtime_config(ec: &EngineConfig) -> anyhow::Result<wasmtime::Config> {
197
196
// handled correctly in wasm-instrument
198
197
c. wasm_multi_value ( false ) ;
199
198
200
- // wasmtime default: false
201
- // Cool proposal to allow function references, but we don't support it yet.
202
- #[ cfg( feature = "wasmtime/gc" ) ]
203
- c. wasm_function_references ( false ) ;
204
-
205
- // wasmtime default: false
206
- // Wasmtime function reference proposal.
207
- #[ cfg( feature = "wasmtime/gc" ) ]
208
- c. wasm_gc ( false ) ;
199
+ // Note: GC is disabled by default.
200
+ // If we add the "wasmtime/gc" feature in the future,
201
+ // we would explicitly set c.wasm_gc(false) and c.wasm_function_references(false) here.
209
202
210
203
// wasmtime default: false
211
204
//
@@ -239,12 +232,13 @@ fn wasmtime_config(ec: &EngineConfig) -> anyhow::Result<wasmtime::Config> {
239
232
c. guard_before_linear_memory ( true ) ;
240
233
c. parallel_compilation ( true ) ;
241
234
242
- // Disable caching if some other crate enables it. We do our own caching .
243
- # [ cfg ( feature = "wasmtime/cache" ) ]
244
- c. disable_cache ( ) ;
235
+ // Note: Caching is disabled by default .
236
+ // If we add the "wasmtime/cache" feature in the future,
237
+ // we would explicitly set c.disable_cache() here.
245
238
246
- #[ cfg( feature = "wasmtime/async" ) ]
247
- c. async_support ( false ) ;
239
+ // Note: Async is disabled by default.
240
+ // If we add the "wasmtime/async" feature in the future,
241
+ // we would explicitly set c.async_support(false) here.
248
242
249
243
// Doesn't seem to have significant impact on the time it takes to load code
250
244
// todo(M2): make sure this is guaranteed to run in linear time.
@@ -264,10 +258,9 @@ fn wasmtime_config(ec: &EngineConfig) -> anyhow::Result<wasmtime::Config> {
264
258
// FIP.
265
259
c. wasm_extended_const ( false ) ;
266
260
267
- // wasmtime default: false
268
- // Disable the component module.
269
- #[ cfg( feature = "wasmtime/component-model" ) ]
270
- c. wasm_component_model ( false ) ;
261
+ // Note: Component model is disabled by default.
262
+ // If we add the "wasmtime/component-model" feature in the future,
263
+ // we would explicitly set c.wasm_component_model(false) here.
271
264
272
265
Ok ( c)
273
266
}
0 commit comments