permaweb / ao

The ao component and tools Monorepo - 🐰 🕳️ 👈
https://cookbook_ao.arweave.dev
Other
190 stars 63 forks source link

feat(cu): indicate to loader whether or not to apply metering #1040

Closed TillaTheHun0 closed 1 month ago

TillaTheHun0 commented 1 month ago

Background

AoLoader overloads WebAssembly.compile and WebAssembly.compileStreaming in order to apply metering to wasm binaries. This is activated via passing a applyMetering flag in the importObject

Problem

The CU currently does not pass this flag

Solution

Add an environment variable to the CU to enable/disable metering. It should default to enabled.