SetFuel sets this store's fuel to the specified value. For this method to work fuel consumption must be enabled via `Config.SetConsumeFuel`. By default a store starts with 0 fuel for wasm to execute with (meaning it will immediately trap). This function must be called for the store to have some fue
(fuel uint64)
| 280 | // |
| 281 | // If fuel is not enabled within this store then an error is returned. |
| 282 | func (store *Store) SetFuel(fuel uint64) error { |
| 283 | err := C.wasmtime_context_set_fuel(store.Context(), C.uint64_t(fuel)) |
| 284 | runtime.KeepAlive(store) |
| 285 | if err != nil { |
| 286 | return mkError(err) |
| 287 | } |
| 288 | |
| 289 | return nil |
| 290 | } |
| 291 | |
| 292 | // Limiter provides limits for a store. Used by hosts to limit resource |
| 293 | // consumption of instances. Use negative value to keep the default value |