-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a WebAssembly API #2853
Comments
Started looking into the metering aspects. Here is a brain dump for now. Might have misunderstood a few things, please correct me. ComputationAs @turbolent wrote in the poc #2760, we need a way to know the remaining computations. FVM has Once have this, we just need a way to convert computation units to wasmtime fuel. Probably just a configurable multiplier would be sufficient? MemoryWe can limit the memory use via following:
Corresponding C documentation: https://docs.wasmtime.dev/c-api/store_8h.html#a0d8cfde96e219dd23d7c65f3cac2e15a. |
@darkdrag00nv2 I haven't looked into it myself yet, but your investigation looks good so far 👍 |
No, it gives the size of a linear memory. |
Opened onflow/flow-go#6215 to add a |
@onflow/flow-cadence-execution @janezpodhostnik How could we define the fuel-to-FVM-computation-usage factor/weight? How did we do this for EVM? |
Issue to be solved
As discussed in https://forum.onflow.org/t/idea-wasm-execution-engine-in-cadence/5164, add an API to Cadence that allows running WebAssembly programs.
Suggested Solution
An MVP should be able to:
i32
ori64
(i.e., notf32
orf64
)#2760 is a PoC implementation of the above. Remaining tasks:
Tasks
The text was updated successfully, but these errors were encountered: