mongo/bazel/wasmtime/store_h.patch
Lee Maguire da7af1bad1 SERVER-116055 Add support for $accumulator in MozJS WASM engine. (#53341)
GitOrigin-RevId: 575a1be1e9bf6e8510aab16cdd924428473e7ca2
2026-05-13 15:25:20 +00:00

20 lines
649 B
Diff

--- a/include/wasmtime/store.h
+++ b/include/wasmtime/store.h
@@ -164,6 +164,16 @@
WASM_API_EXTERN wasmtime_error_t *
wasmtime_context_set_fuel(wasmtime_context_t *store, uint64_t fuel);
+/**
+ * \brief Set the per-Store hostcall fuel cap (component model).
+ *
+ * Bounds how much data wasmtime will copy between host and guest across
+ * component-model calls. Pass `SIZE_MAX` to disable the cap. Mirrors
+ * `Store::set_hostcall_fuel` on the Rust side.
+ */
+WASM_API_EXTERN void
+wasmtime_context_set_hostcall_fuel(wasmtime_context_t *store, size_t fuel);
+
/**
* \brief Returns the amount of fuel remaining in this context's store.
*