Skip to content
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

consider wasmer Metering #5329

Open
youknowone opened this issue May 20, 2024 · 1 comment
Open

consider wasmer Metering #5329

youknowone opened this issue May 20, 2024 · 1 comment

Comments

@youknowone
Copy link
Member

Summary

Check if this is available for RustPython
https://docs.rs/wasmer-middlewares/latest/wasmer_middlewares/metering/struct.Metering.html

Details

@narodnik
Copy link

Just adding some a use case for this:

You want to embed Python in your application. Users can load plugins which are untrusted code. The app wants to be able to poll the plugins fairly, while limiting the resources they can access.

We do this by metering, after which the function is paused. We can either resume or drop it.

That way the app runs each untrusted script periodically for some increment of time. Just like how garbage collection strategies in some languages may run a little bit and then pause to avoid consuming too much resources, we can do the same. Also we can make it more costly to run a script, the longer it is running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants