-
Notifications
You must be signed in to change notification settings - Fork 824
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 support for gas metering to cranelift backend #819
Comments
Awesome. Thanks for creating the issue so we can keep track of this over time :) |
@MarkMcCaskey is implementing the alternative suggestion in #817 now . I think there's two ways to handle this: |
In the refactor, all compilers will support any kind of middleware, including metering. Will close this issue once we merge the refactor into |
Closing this issue in favor of #1418 |
Thanks for proposing a new feature!
Motivation
As I worked to expose gas metering in the C API, I discovered that it was not supported with the default cranelift backend. The wasmer team assured me this is a known issue and on their roadmap.
It would be nice to enable metering without having to switch backends (unless one wants to), and also make less headache in configuration. However, this is not urgent. Mainly I wanted an issue to track progress.
Proposed solution
Support for for
StreamingCompiler
with middleware when usingwasmer_clif_backend::CraneliftModuleCodeGenerator
.This can be easily tested on the #736 branch (or master when merged) by going into
runtime-c-api
package and executingcargo test --features metering
.Alternatives
Officially mark that middleware is not supported with cranelift. But I think this feature is desired, just not enough devs to implement it.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: