Skip to content

Commit cbc75ab

Browse files
committed
chore: remove references to wasmtime features not enabled
1 parent 050bcee commit cbc75ab

File tree

1 file changed

+15
-22
lines changed

1 file changed

+15
-22
lines changed

fvm/src/engine/mod.rs

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,9 @@ fn wasmtime_config(ec: &EngineConfig) -> anyhow::Result<wasmtime::Config> {
164164
c.static_memory_maximum_size(instance_memory_maximum_size);
165165
c.static_memory_forced(true);
166166

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.
171170

172171
// wasmtime default: true
173172
// 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> {
197196
// handled correctly in wasm-instrument
198197
c.wasm_multi_value(false);
199198

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.
209202

210203
// wasmtime default: false
211204
//
@@ -239,12 +232,13 @@ fn wasmtime_config(ec: &EngineConfig) -> anyhow::Result<wasmtime::Config> {
239232
c.guard_before_linear_memory(true);
240233
c.parallel_compilation(true);
241234

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.
245238

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.
248242

249243
// Doesn't seem to have significant impact on the time it takes to load code
250244
// 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> {
264258
// FIP.
265259
c.wasm_extended_const(false);
266260

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.
271264

272265
Ok(c)
273266
}

0 commit comments

Comments
 (0)